Skip to playerSkip to main content
  • 14 years ago
A simple C program of adding USER input numbers.
I used Visual Studio 2008 Command Prompt.
The code for the program is:

#include
int main(void)
{
int a=0,b=0;
int c;
printf("Enter First Number:\a");
scanf("%d",&a);
printf("\nEnter Second Number:\a" );
scanf("%d",&b);
c=a+b;
printf("\n\aThe Sum of %d and %d is %d\n\n",a,b,c);
return 0;
}
Comments

Recommended