Subtraction in C

In the below program is the subtraction of two numbers, the user is need to enter two numbers and the input is fetched using the pre-defined function scanf() and stored in the variables a and b. Then, the variables a and b are subtracted and the result is stored in the variable c.

Below is the subtraction of two numbers program in C:

void main()
int a,b,c;
printf("\n\n\t\t\t SUBTRACTION\n\nEnter the two number: ");
printf("\nDifference = %d",c);

In the above program, the variables a, b and c are declared as integer datatypes.

Leave a Reply