# 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)

compute the following expressions:

a+b

a-b

a*b

sqrt(a)

Expert's answer

# 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;

}

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;

}

## Comments

## Leave a comment