Sum of Two Numbers
Sum of Two Numbers
Aim:
To write a C program to get the sum of two number.
Algorithm:
Step 1: Start the program.
Step 2: Read the two variables a,b.
Step 3: Sum of a and b (c=a+b).
Step 4: Start the result.
Step 5: Stop the program.
Program Coding:
#include<stdio.h>
#include<conio.h>
Void main()
{
int a,b,c;
Clrscr();
Printf(enter the two numbers);
Scanf(%d %d,&a,&b);
C=a+b;
Printf(the answer is %d,c);
getch();
}
Result:
Thus the C program was created and output is successfully verified.
Printf(c is greater);
}
getch();
}
Result:
Thus the C program was created and output is successfully verified.