Q. Write a program to add two numbers?
Ans.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum;
clrscr();
printf("Enter Numbers a and b : ");
scnaf("%d%d",&a,&b);
sum=a+b;
printf("
sum(a+b)=%d",sum);
getch();
sum(a+b)=%d",sum);
getch();
}
Output of above program :
Enter Numbers a and b : 100
200
sum(a+b)=300
0 comments:
Post a Comment