Write a C program to calculate difference of two numbers

By | November 3, 2016

Calculate difference of two numbers


Write a C program to calculate difference of two numbers. Here’s simple program to calculate difference of two numbers in C Programming Language.

In this program, Firstly, we are going to take input of two numbers from the user and then check for the condition which number is larger. After that, we use basic formula to calculate difference of two numbers i.e diff = num1 – num2;


Below is the source code for C program to calculate difference of two numbers which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



OUTPUT : :



Above is the source code for C program to calculate difference of two numbers which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

Leave a Reply