In this C programming example, the user is asked to enter two numbers. Then, the sum of these two integers is calculated and displayed on the screen.
PROGRAM :
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter two number to add \n");
scanf("%d%d",&a,&b);
c = a + b;
printf("\nSum of %d and %d is %d",a,b,c);
return 0;
}