Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Difference between two numbers(float) in C++ Language







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>") ;
}




Don't just read, write it, run it.....color>

RESULT:color>








This post first appeared on ProgramJoy.blogspot.com, please read the originial post: here

Share the post

Difference between two numbers(float) in C++ Language

×

Subscribe to Programjoy.blogspot.com

Get updates delivered right to your inbox!

Thank you for your subscription

×