Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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, $5, and $1 bills. Specifications: Write a program that prompts the user to enter a U.S 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

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

Presentation Aids Practicing Your Speech?

Answered: 1 week ago