Subtraction of two number in C language by R4R Team


program-

#include < stdio.h>
int main()
{
int a,b,c;
//Firt number input
printf("Enter first number\n");
scanf("%d",&a);
//second number input
printf("Enter second number\n");
scanf("%d",&b);
//Now subtract
c=a-b;
//print it
printf("Subtraction is %d",c);
}


output-

Enter first number
24
Enter second number
23
Subtraction is 1


Enter first number
24
Enter second number
1
Subtraction is 23


-In this program, we take a input of two number and store in variable 'a' or variable 'b' and subtract the second number from the first number store in variable 'c' and at last we print that number.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!