Answer to Question #19713 in C++ for ben
read 2 numbers a and b
compute the following expressions:
a+b
a-b
a*b
sqrt(a)
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment