Martes, Hunyo 7

Simple Addition in C Programming

I have here a code that allows the user to input two numbers and then sum up their values. I'm using C-Free as my compiler.

#include

   int main()

{

int add1, add2, sum;

printf("Enter the first number.\n");
scanf("%d", &add1);
printf("Enter the second number.\n");
          scanf("%d",&add2);
sum=add1+add2;
printf("%d", sum);
          return 0;
}


0 comments:

Mag-post ng isang Komento

 
Powered by Blogger