Question #24684

Write a program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum, product, difference and quotient of the two numbers.

Expert's answer

# include <iostream>
# include <string >

using namespace std;


int main(){

double a,b;
cout<<"Enter two numbers:";
cin>>a;
cout<<"Enter second:";
cin>>b;
cout<<"A+B="<<a+b<<endl;
cout<<"A-B="<<a-b<<endl;
cout<<"A/B="<<a/b<<endl;

system("PAUSE");
return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS