Answer to Question #19713 in C++ for ben

Question #19713
read 2 numbers a and b
compute the following expressions:
a+b
a-b
a*b
sqrt(a)
1
Expert's answer
2012-11-30T06:25:22-0500
# include <iostream>

using namespace std;

int main(){
double a,b;
cout<<"Enter first value: ";
cin>>a;
cout<<"Enter second value: ";
cin>>b;
cout<<endl;
cout<<"a+b="<<a+b<<endl;
cout<<"a-b="<<a-b<<endl;
cout<<"a*b="<<a*b<<endl;
cout<<"sqrt(a)="<<sqrt(a)<<endl;

system("PAUSE");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS