Mathematics program!

closed account (1wA05Di1)
I am doing an assignment that needs me to program a total of 8 math operations, but I can only use 4 inputs. I searched everywhere and I am stuck because I dont know how to prompt the user for 3 integers (quadratic) and the next operation have the terminal to prompt the user for 2 inputs ( addition) . I know its if and else statements but i dont know how to prompt the user properly in order to have a concise code.. using only 4 variables.
Can you post your code?
closed account (1wA05Di1)
#include <iostream>
#include <cmath>
using namespace std;

int main ()
{
int a;
int x, y, z;
bool threeintegers = true;
bool twointengerers = true;
bool oneintenger =true;

cout << "Please choose an operation:" << endl;
cin >> a
cout << endl;


if((a == pythagorean) || (a == quadratic))
{
cout << "Enter your first integer: " << endl;
cin >> x;
cout << endl;

cout << "Enter your second integer: " << endl;
cin >> y;
cout << endl;

cout << "Enter your third integer: " << endl;
cin >> z;
cout << endl;

if((a == addition))
{
if
{


}
}
}




return 0;
}
this is what i have so far
Topic archived. No new replies allowed.