Write function definition for calc() which intakes two integers and an arithmetic operator and prints the corresponding result.
Use the following prototype to define your function:
//takes two operands for the evaluation as value1 and value2
//take the operator (+,-,/,*,%) as a char
//prints the answer within the function; does not return any value - hence void.
I'm guessing i have to establish something along the lines of this:
void calc (int value1, int value2, char c);
And probably use conditional statements with a switch in them...although i'm not sure how this problem would look.
Could anyone help plot this out to show me what it would look like? Any help is greatly appreciated.