Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Save the file as lastname_hw2.c. Assignment is due by 11:59 pm on Tuesday 2/9/21. Write a generic program to convert a given dollar amount into

image text in transcribed
Save the file as lastname_hw2.c. Assignment is due by 11:59 pm on Tuesday 2/9/21. Write a generic program to convert a given dollar amount into its equivalent denominations of $100, $50, $20, $10, $5 and $1 bills. There are fixed number of bills available as decided by user. User Input: Enter the available number of $100 bills = 15 Enter the available number of $50 bills = 20 Enter the available number of $20 bills = 80 Enter the available number of $10 bills = 250 Enter the available number of $5 bills = 650 Enter the available number of $1 bills = 1000 Enter the given dollar amount = 1797 Expect Output: Total amount available = 100(15) + 50(20) + 20(80) + 10(250) + 5(650) + 1000 = $10,850 Number of least hundred-dollar bills = 15 Number of least fifty-dollar bills = 5 Number of least twenty-dollar bills = 2 Number of least ten-dollar bills = 0 Number of least five-dollar bills = 1 Number of least one-dollar bills = 2

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions

Question

What is the purpose of the EEOC?

Answered: 1 week ago