Yasir's Blog
Pages
About Me
C Programs
Java Programs
ML
Contact Me
Sitemap
Privacy Policy
Home
»
C Programs
»
C Program for Addition of Two numbers
Friday, 30 December 2016
C Program for Addition of Two numbers
Program:
This program is saved as add.c
#include
int main() { int first,second,sum; printf("Enter two integers to add\n"); scanf("%d%d",&first,&second); sum = first + second; /* Adding contents of first and second and storing in sum */ printf("Sum of entered numbers = %d",sum); return 0; }
Output:
Enter two integers to add 45 55 Sum of entered numbers = 100
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment