Write a C program to calculate sum of two numbers?
Answers
Answered by
12
This is a simplest program for calculate the sum of two numbers.
#include<stdio.h>
int main()
{
int a, b, sum;
printf("\nEnter two no: ");
scanf("%d %d", &a, &b);
sum = a + b;
printf("Sum : %d", sum);
return(0);
}
Hope it helps you.
#include<stdio.h>
int main()
{
int a, b, sum;
printf("\nEnter two no: ");
scanf("%d %d", &a, &b);
sum = a + b;
printf("Sum : %d", sum);
return(0);
}
Hope it helps you.
Answered by
15
\* C Program to Add two numbers *\
# include < stdio.h >
int main( )
{
int a, b, sum;
printf(" Enter the First Number : ");
scanf("%d",& a);
printf("\n Enter the Second Number : ");
scanf("%d",& b);
sum = a + b;
printf("\n Sum of two Number : %d",sum);
return ( 0 );
}
thanks
# include < stdio.h >
int main( )
{
int a, b, sum;
printf(" Enter the First Number : ");
scanf("%d",& a);
printf("\n Enter the Second Number : ");
scanf("%d",& b);
sum = a + b;
printf("\n Sum of two Number : %d",sum);
return ( 0 );
}
thanks
PrettyDoll1:
sorry but u r username is not good so u may unfollow me
Similar questions
English,
6 months ago
Political Science,
6 months ago
Math,
1 year ago
Physics,
1 year ago
Biology,
1 year ago