Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C programming please Write a C program that asks the user to enter three numbers (integres). A menu will be displayed to let the user

image text in transcribedimage text in transcribed

C programming please

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 numbers 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. Sample Run 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 product 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 0? 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 product 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 n/N: 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books