Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program using a menu to execute the following: Menu 1 Gas Mileage 2 Sales Commission 3 Grade Calculation 4 - Quit Verify the

Write a program using a menu to execute the following:

Menu 1 Gas Mileage

2 Sales Commission

3 Grade Calculation

4 - Quit Verify the menu choice is 1, 2, 3, or 4

The program should continue to loop until the user selects 4 to quit. For the Gas mileage part of the problem.

Menu 1 - Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several tanks of gasoline by recording miles driven and gallons used for each tank. Develop a program using a while loop that will input the miles driven and the gallons used for each tank. The program should calculate and display the miles per gallon obtained for each tank. After processing all input information, the program should calculate and print the overall miles per gallon obtained for all tanks.

Menu 2- People in sales frequently earn a base salary and commission on their sales. A company has asked you to write a program to estimate the payroll for the week given a persons sales. The sales force earns a base salary of $300 per week plus 12% of their total sales for the week. Since each department has a different number of employees, use a while loop to allow the user to exit the program by entering an employee number less than 100 when they have completed.

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

ISBN: 1489982175, 978-1489982179

More Books

Students also viewed these Databases questions