Write a C program to add two numbers or addition program in c
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum;
clrscr();
printf("Enter two numbers:\n");
scanf("%d%d",&a,&b);
sum=a+b;
printf("Sum=%d",sum);
getch();
}
Output:
Enter two numbers:
2
3
Sum=5
No comments: