code to add numbers in c

Solutions on MaxInterview for code to add numbers in c by the best coders in the world

showing results for - "code to add numbers in c"
Erica
09 Mar 2016
1#include <stdio.h>
2int main() {    
3
4    int number1, number2, sum;
5    
6    printf("Enter two integers: ");
7    scanf("%d %d", &number1, &number2);
8
9    // calculating sum
10    sum = number1 + number2;      
11    
12    printf("%d + %d = %d", number1, number2, sum);
13    return 0;
14}
15