#include<stdio.h>
#include<conio.h>
int main()
{
int a, b, sum;
printf("Enter the value of a: ");
scanf("%d", &a);
printf("Enter the value of b: ");
scanf("%d", &b);
sum = a + b;
printf("Sum of %d and %d is %d.",a,b,sum);
getch();
return 0;
}
--------------------------------------------------
Note: If you are using compiler other than Turbo C then you do not need clrscr(), getch() and #include<conio.h>
Output of the above program :
Enter the value of a: 13 ↲
Enter the value of b: 33 ↲
Sum of 13 and 33 is 46.
Note: ↲ indicates ENTER is pressed.