Since Midterm 2 is Monday October 24th, no late assignments will be accepted beyond 5:00pm on Friday October 21st, so that the solutions can be posted to be studied before the midterm.
Name your files hw4_<problem>.cpp, such as hw4_1.cpp. Email all the cpp files to my account.
int main() { int num1, num2, num3; double dnum1, dnum2; // Two integer version get_input(num1, num2); print_min(find_min(num1, num2)); // Two double version get_input(dnum1, dnum2); print_min(find_min(dnum1, dnum2)); // Three integer version get_input(num1, num2, num3); print_min(find_min(num1, num2, num3)); return 0; }
Welcome to the CS221 Homework 4 Menu ==================================== 1. Multiply two integers 2. Divide two integers 3. Check if a number is within the range 10-20 4. Find the minimum of a list of 3 numbers 0. Exit ==================================== Enter selection:From within each case statement, there will be a void function that gets the input from the user using by-reference parameters and a second void function that takes the input as by-value parameters, does the task and prints the result to the screen. For example, the first menu item case statement would be:
case 1: get_input(a, b); cout << "The result is " << multiply(a, b) << endl; break;You should have at least the following 7 functions in your final code. More functions are fine if you wish to break each menu item task into subtasks.