In this tutorial i shall show you how to do "Subtraction of two numbers in C" programming language. to perform Subtraction of two numbers in C we write a very simple program In CodeBloks IDE.
Let's understand through an example:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=5,b=7,sub;
sub = a-b;
printf("subtraction of a and b is %d",sub);
return 0;
}
Output of this program will be: subtraction of a and b is -2
No comments:
Post a Comment