Have you learned about sub programs yet? You could save a lot of typing by doing a subprogram for i/o like this
1 2 3 4 5 6 7
|
void get_input( int &input1 , int &intput2 )
{
cout << "Please enter operand one: ";
cin >> input1;
cout << "Please enter operand two: ";
cin >> input2;
}
|
Then call it like
|
get_input( input1 , input 2 );
|
For those 6 times in your switch.
Also I am not exactly sure what your instructor wants. It sounds like you are trying to say that you need to output this stuff:
sum = operand1 + operand2
difference = operand1 + operand2
product = operand1 * operand2
integer quotient = static_cast<int>( operand1 / operand2 ); //you want to cast to an int
remainder = operand1 % operand2
rational quotient = operand1 / operand2
sqrt of operand 1 = sqrt( operand1 );
operand2 power of 4 = pow( operand2 );
Could you maybe post the assignment?