Question: Write a program that displays a menu and asks the user to pick one of the options. The program should run continuously until the user

 Write a program that displays a menu and asks the user

Write a program that displays a menu and asks the user to pick one of the options. The program should run continuously until the user selects quit. Make sure to validate using the proper type of loop Vending machine Loan Quit Upon choosing option 1 do the following This piece will determine the change that is to be dispensed from a vending machine. An item in the machine can cost anywhere between 25 cents and a dollar, in 5 cent increments (25, 30, 35 ... 90, 95, 100), and accepts only a single dollar bill to pay for the item. For a example a possible sample dialog might be Enter price of item: 45 You bought an item for 45 cents and gave me a dollar so your change is 2 quarters, 0 dimes, and 1 nickel. You can assume all items will be less than one dollar. Validate to make sure that the user has not entered a price more than one dollar. Upon choosing option do the following: This piece will calculate the monthly payment on a loan. The monthly payment on a loan may be calculated by the following formula Payment= Rate* (1 + Rate)/((1 + Rate)* L The user will enter the interest rate, the loan amount and the number of payments. Make sure to use the double data type for your declarations. For the interest rate, you need to convert it into a monthly interest rate by dividing it by 12 and then further dividing it by 100. For example 12% would become 1% after the calculation. N is the number of payments L is the amount of the loan This is what should be displayed at the end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!