#include int main() { int num1, num2, sum; printf("\nEnter two numbers: "); scanf("%d %d", &num1, &num2); sum = num1 + num2; printf("Sum of two numbers= %d", sum); return(0); }
Output
Enter two numbers: 10 12
Sum of two numbers= 22
0 0#include int main() { int num1, num2, sum; printf("Enter two integer numbers: "); scanf("%d %d", &num1, &num2); // calculating sum sum = num1 + num2; printf("%d + %d = %d", num1, num2, sum); return 0; }
Output
Enter two integer numbers: 3 3
3 + 3 = 6
Enter two integer numbers: 1 3
0 0Please Login to Post the answer