Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++, please do not use if statements or any loops, write it as a beginner Write a program that helps a cashier make change. The

image text in transcribed
c++, please do not use if statements or any loops, write it as a beginner
Write a program that helps a cashier make change. The program gets a dollar amount from the user and calculates and displays how to make the change amount entered using the smallest number of bills and coins possible. The change should be made by first giving the maximum number of dollars followed by the maximum number of quarters, then dimes, nickels, and finally penniesie Your answer should never have more than 3 quarters, 2 dimes, 1 nickel, or 4 pennies) You may assume that only amounts greater than $o will be entered Hint Convert the amount entered by the user to pennies rounding up to the nearest integer using the round function from math You do not need and cannot use decisions in your solution For example, if the user enters 1939 the output of your program should be as shown below Note, there is one tab before each of the quantities of dollars, quarters, etc. Change Duet 19 dollars 1 quarters 1 dimes O nickela 4 pennies Make sure you include a ciear and explicit prompt asking the user to enter the amount of the change to be made in dollars Clearly label each output including the units In your IDE, not for submission, investigate what happens if you don't use the round function when the input is 4 14. Think about what causes this Additional Requirements To complete this assignment you are ONLY allowed to use what is discussed in Chapters 1 - 3 of the text and lectures If you already know how to program refrain from using more advanced constructs or library routines. The problem can and should be solved using only what we have leamed in the course You must follow the style guidelines described in the document named (Programming Style Guidelines) provided in eLearning Be sure you have reviewed the style guidelines carefully

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_2

Step: 3

blur-text-image_3

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

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions