C Program to find the sum of two integer numbers

User enters integer values for variable a and b, adds the two values and stores it in variable 'sum'. The value stored at variable 'sum' is printed on the console.

Program

#include<stdio.h>
void main()
{
	int a, b, sum;
	printf("Enter two numbers:\n");
	printf("a:\t");
	scanf("%d", &a);
	printf("b:\t");
	scanf("%d", &b);
	sum = a + b;
	printf("Sum of %d and %d is %d\n", a, b, sum);
}

Output

Enter two numbers:
a:	44
b:	13
Sum of 44 and 13 is 57