C Program Addition of Two Numbers

By | March 6, 2020

C Program Addition of Two Numbers

#include <stdio.h>
int main()
{
  int addition, num1, num2;

  printf("Enter two numbers to add\n");
  scanf("%d%d", &num1, &num2);

  addition = num1 + num2;

  printf("Sum of the numbers = %d\n", addition);

  return 0;
}

Output

Enter two numbers to add
10
200
Sum of the numbers = 210

——————————–
Process exited after 24.46 seconds with return value 0
Press any key to continue . . .

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *