Question: Write a C program that asks the user to enter three numbers (integres). A menu will be displayed to let the user choose one of
Write a C program that asks the user to enter three numbers (integres). A menu will be displayed to let the user choose one of the three options: print the two highest numbers, product of the three mmbers or the division of the second by the by the third if the third is not zero. See the sample runs. Required: Your code must use : One function to get the numbers from the user One function for each of the three options - Add other functions as you see fit Enter the three numbers: 1 10 0 Choose from the following options: 1, 2 or 3? 1 to print the two highest numbers 2 to print the product of the three numbers 3 to print the division of the second number by the third Enter your selection: 4 Sorry invalid option. Try again: 3 Sorry cannot 10 divide by zero! Would like to keep working with 1.5, 10 and 0? Enter y/Y or n/N: y 1, 2 or 3? 1 to print the two highest numbers 2 to print the produet of the three numbers 3 to print the division of the second number by the third Enter your selection: 2 1 times 10 times 0 0 Would like to keep working with 1. 10 and o? Enter y/Y or n/N: 1 Sorry Invalid entry! Please enter y/Y or n/N:n Now, would like to work with new numbers? Enter y/Y or n/N: Y Enter the three numbers: -2 -1001 Choose from the following options: 1, 2 or 37 1 to print the two highest numbers 2 to print the product of the three numbers 3 to print the division of the second number by the third l uu I, 10 and UP Enter y/Y or n/N: 1 Sorry Invalid entry! Please enter y/Y or n/N: n Now, would like to work with new numbers? Enter y/Y or n/N: Y Enter the three numbers: -2 -100 1 Choose from the following options: 1, 2 or 3? 1 to print the two highest numbers 2 to print the produet of the three numbers 3 to print the division of the second number by the third Enter your selection: 1 The two highest numbers are: -2 and 1 Would like to keep working with -2. 100 and 0? Enter y/Y or n/N: n Now, would like to work with new numbers? Enter y/Y or nAN: N Sad to see you go but don't forget to submit your c file and on time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
