Addition of two number in C language by R4R Team


program-

#include < stdio.h>
int main()
{
int a,b,c;
//First number input
printf("Enter first number\n");
scanf("%d",&a);
//second number input
printf("Enter second number\n");
scanf("%d",&b);
//Now add both number
c=a+b;
//print addition
printf("Addition is %d",c);
}


output-

Enter first number
23
Enter second number
24
Addition is 47


Enter first number
1
Enter second number
24
Addition is 25


-In this program, we take a input of two number and store in variable 'a' or variable 'b' and sum up both number and store in variable 'c' and at last we print that number.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!