515,204 views
12 votes
12 votes
Write a program that asks the user to enter two numbers, obtains the two numbers from the user, and prints out the sum, product, difference, quotient, and remainder of the two numbers.

User Konradowy
by
2.6k points

1 Answer

25 votes
25 votes

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;

}

User Hrach
by
2.7k points