In this program, user is asked to enter two integers and this program will add these two integers and display it.
Source Code
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter first value="); // 1st number
scanf("%d", &a);
printf("Enter second value=n"); // 2nd number
scanf("%d", &b);
c=a+b; // Add
printf("sum=%d", c); // result store in c variable
return 0;
}
Output
0 comments:
Post a Comment