This blog assists in mastering C and C++ programming skills from basics to advanced levels.
Pages
▼
Tuesday, June 14, 2016
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 is %d", number1 + number2); return 0; } Output of program Enter your number1:20 Enter your number2:30 Addition is 50
No comments:
Post a Comment