Oct 8, 2012

Sum of two numbers with variables, short version.

Same as the last post, a simple sum with variables entered by the user in the code, the program will not ask for them in the time you run the program. Thsi time is in short code version, but it does the same.

#include <stdio.h>

main()
{
      int firstNumber = 234;
      int secondNumber = 567;
      int addition;
     
      addition = firstNumber + secondNumber;
      printf("Your addition is %d", addition);
      getchar();
}

No comments:

Post a Comment