Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ You work at a bank and needs to automate the bills that are given to a customer when they cash a check. When the

C++ image text in transcribed
You work at a bank and needs to automate the bills that are given to a customer when they cash a check. When the check is cashed, the system should automatically break down the dollar amount into the smallest number of $20, $10, S5, and $1 bills. Specifications: Write a program that prompts the user to enter a US dollar amount and then shows how to pay the customer using the smallest number of bills. After the program runs, prompt the user if he/she needs to enter another dollar amount, and repeat as necessary. After prompting the user to enter the dollar amount, scan it in and calculate the number of twenties, tens, fives, and ones that are necessary to pay to the customer. You may assume that the dollar amount is always an integer value. Since the program should allow the user to input multiple dollar amounts, use a do-while loop to help solve the problem. As an example, if you execute the program with the following underlined inputs, the output will be: > main.o Enter a dollar amount : 93 $20 bills: 4 $10 bills: 1 $5 bills: 0 $ 1 bills: 3 Convert another dollar amount? (Y/N): Y Enter a dollar amount : 42 $20 bills: 2 $10 bills: 0 $ 5 bills: 0 $ 1 bills: 2 Convert another dollar amount? (Y/N): N

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

Real Time Database Systems Architecture And Techniques

Authors: Kam-Yiu Lam ,Tei-Wei Kuo

1st Edition

1475784023, 978-1475784022

More Books

Students also viewed these Databases questions

Question

What are some ethical problems in buzz marketing?

Answered: 1 week ago