In this C++ program we will calculate the difference between the two numbers(float) and print the result, in the screen. The two numbers will be taken from the user.color>
input:
Two numbers. (i.e. 15.6,65.7 etc.)output:
Difference between the given numbers(float) will be printed on the screen.CODE---->
#include
color>using namespace std;
main()color>
{
float num1, num2, difference;
cout\n Enter a Number : color>" ;
cin>>num1 ;
cout\n Enter another Number : color>" ;
cin>>num2 ;
difference = num1 - num2 ;
cout\n The Difference between the Numbers is : color>" system("pausecolor>") ;
}
color>