Saturday, 10 December 2011

Write a program to subtraction in c

#include
#include
main()
{
int a,b,sub;
clrscr();
printf("ENTER NO.A:-");
scanf("%d",&a);
printf("ENTER NO.B:-");
scanf("%d",&b);
sub=a-b;
printf("\n\t sub=%d",sub);
getch();
}


OUTPUT
ENTER NO. A:20
ENTER NO. B:10
SUB=10

No comments:

Post a Comment