Write a program subtract two number in c Program
//Write a program subtract two number.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sub;
printf("\n Enter First Number=");
scanf("%d",&a);
printf("\n Enter Second Number=");
scanf("%d",&b);
sub=a-b;
printf("\n sub=%d",sub);
//Second method
printf("\n sub=%d-%d=%d",a,b,a-b);
getch();
}
Output: -
Enter First Number=50
Enter Second Number=23
sub=27
sub=50-23=27
Related Program (Please Check)
0 Comments