#include <iostream>
#include <string>
using namespace std;
int mult (int x, int y);
int main()
{
string answer;
int x;
int y;
cout << "Give me two numbers: ";
cin >> x >> y;
cin.ignore();
cout << "Do you want to add, multiply, subtract, or divide?\n";
cin >> answer;
cin.ignore();
if ((answer == "Add"))
{
cout << "These two numbers equal "<< x+y <<".\n";
}
int mult (int x, int y);
{
return x+y;
}
if ((answer == "Multiply"))
{
cout << "These two numbers equal "<< x*y <<".\n";
}
int mult (int x, int y);
{
return x*y;
}
if ((answer == "Subtract"))
{
cout << "These two numbers equal "<< x-y <<".\n";
}
int mult (int x, int y);
{
return x-y;
}
if ((answer == "Divide"))
{
cout << "These two numbers equal "<< x/y <<".\n";
}
int mult (int x, int y);
{
return x/y;
}
}
thanks in advance, guys.

New Topic/Question
Reply



MultiQuote




|