What is an Algorithm?

It is a logical process of analyzing a mathematical problem and data step-by-step so as to make it easy for computing or for conversion of data into information for solving our problem.

  1. a) Write an algorithm for addition of 2 numbers.
  2. START
  3. Input First Number as Num1
  4. Input Second Number as Num2
  5. Calculate Add= Num1 + Num2
  6. Print Value of Add
  7. END

Flow Charts:

Flow chart is a step-by-step diagrammatic representation of the logic paths contained within a computer program (Algorithm).

OR

Flow chart is a diagrammatic representation of the procedure for solving the problem.

 b) Draw a flowchart for addition of 2 numbers.

Addition of Two numbers
c) C-Program for addition of Two numbers.
#include<stdio.h>
void main()
{
int num1,num2,add;
printf(“Enter First number :  “);
scanf(“%d”,&num1);
printf(“Enter Second number :”);
scanf(“%d”,&num2);
add=num1+num2;
printf(“\n The Addition of the Two given number is : %d”, add);
}