C++ how to add two numbers

label Programming
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

C++ how to add two numbers and get input from user.

May 10th, 2014

Include<iostream.h> 
void main() 

float a,b; 
cout<<"Enter 2 Numbers:"<<endl; 
cin>>a>>b; 
cout<<"Sum= "<<a+b<<endl; 
cout<<"Product= "<<a*b<<endl; 
cout<<"Difference= "<<a-b<<endl; 
cout<<"Quotient= "<<a/b<<endl; 
}

May 10th, 2014

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
May 10th, 2014
...
May 10th, 2014
Jun 28th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer