Sum of Two Numbers in C

C program to find sum of two integer numbers

    
#include <stdio.h>
int main() {    
	int number1, number2, sum;
    
	printf("Enter two integers: ");
	scanf("%d %d", &number1, &number2);

	// calculating sum
	sum = number1 + number2;      

	printf("%d + %d = %d", number1, number2, sum);
	return 0;
}
  

Output

Enter two integers: 10 
15
10 + 15 = 25
  

Post a Comment

1 Comments