In this tutorial we will discuss on how to find the sum of
two numbers using c program.
For any c program the header file that must be included is
stdio.h which stands for standard input output.
PROGRAM:
#include<stdio.h>
void main()
{
int a,b,sum;
printf(“Enter two numbers \n”);
scanf(“%d%d”,&a,&b);
sum=a+b;
printf(“Sum of two numbers is %d”,sum);
}
OUTPUT:
Enter two numbers
2 3
Sum of two numbers is 5
No comments:
Post a Comment