Saturday, 10 December 2011

Write a program to addition in c

#include
#include
main()
{
int a,b,tot;
clrscr();
printf("ENTER NO.1:- ");
scanf("%d",&a);
printf("ENTER NO.2:- ");
scanf("%d",&b);
tot=a+b;
printf("\n\ttotal=%d",tot);
getch();
}


OUTPUT
ENTER NO.1:10
ENTER NO.2:10
TOTAL=20

No comments:

Post a Comment