Monday, February 8, 2016

C program to read two numbers from user and display addition on screen.

#include<stdio.h>
int main()
{
int number1, number2;

printf("Enter your number1:");
scanf("%d",&number1);

printf("Enter your number2:");
scanf("%d",&number2);

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

Output of program

Enter your number1:5
Enter your number2:6
Addition=11


No comments:

Post a Comment