Saturday, 2 May 2015

Addition Program in c language


Addition Program in c Language Will Be Here Using Three Variables  (a,b,c) . We Enter Two Variable Numbers.Program Enter Numbers Are Consider (a,b) in scanf operation (known Reading operation).Here,Addition Program Logic c=a+b; .Then Printf Operation Addition Program Value is Stored In C. 


Addition program in c

#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter the two numbers:");
scanf("%d%d",&a,&b);
c=a+b;
printf("the addition value is:%d",c);
}

Output

Enter the two numbers:23
34
the addition value is:57

No comments:

Post a Comment