AHPA #4: The C ATM Machine • Two people, "a" and "b", have checking and savings accounts. • Create a 2x2 array to hold their amounts: a – checking: $500, savings: $1,000; b – checking: $750, savings: $325. • Have the ATM machine ask the user their name. • Ask the user if they want to withdraw from their checking or their savings account. • Use a switch statement to process different types of accounts. • Create software that will provide an ATM user with the proper change for any dollar amount up to $200. • Example: Run the code for $19, $55, and $200. Is the amount > $100, then provide a $100 bill & subtract $100 • Is the amount >= $100, then provide a $100 bill & subtract $100 • Is the amount > $20, then provide a $20 bill & subtract $20 [repeat 4 times] • Is the amount > $10, then provide a $10 bill and subtract $10 • Is the amount > $5, then provide a $5 bill and subtract $5 • Provide the remaining amount in single $1 bills so the output should be like shown in picture, and please write the comments (USE C LANGUAGE)
AHPA #4: The C ATM Machine • Two people, "a" and "b", have checking and savings accounts. • Create a 2x2 array to hold their amounts: a – checking: $500, savings: $1,000; b – checking: $750, savings: $325. • Have the ATM machine ask the user their name. • Ask the user if they want to withdraw from their checking or their savings account. • Use a switch statement to process different types of accounts. • Create software that will provide an ATM user with the proper change for any dollar amount up to $200. • Example: Run the code for $19, $55, and $200. Is the amount > $100, then provide a $100 bill & subtract $100 • Is the amount >= $100, then provide a $100 bill & subtract $100 • Is the amount > $20, then provide a $20 bill & subtract $20 [repeat 4 times] • Is the amount > $10, then provide a $10 bill and subtract $10 • Is the amount > $5, then provide a $5 bill and subtract $5 • Provide the remaining amount in single $1 bills so the output should be like shown in picture, and please write the comments (USE C LANGUAGE)
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 2MQ6: Jake’s Car Rental charges each customer a daily rental fee of $55. However, there is an additional...
Related questions
Question
AHPA #4: The C ATM Machine
• Two people, "a" and "b", have checking and savings accounts.
• Create a 2x2 array to hold their amounts: a – checking: $500, savings:
$1,000; b – checking: $750, savings: $325.
• Have the ATM machine ask the user their name.
• Ask the user if they want to withdraw from their checking or their savings
account.
• Use a switch statement to process different types of accounts.
• Create software that will provide an ATM user with the
proper change for any dollar amount up to $200.
• Example: Run the code for $19, $55, and $200.
• Two people, "a" and "b", have checking and savings accounts.
• Create a 2x2 array to hold their amounts: a – checking: $500, savings:
$1,000; b – checking: $750, savings: $325.
• Have the ATM machine ask the user their name.
• Ask the user if they want to withdraw from their checking or their savings
account.
• Use a switch statement to process different types of accounts.
• Create software that will provide an ATM user with the
proper change for any dollar amount up to $200.
• Example: Run the code for $19, $55, and $200.
Is the amount > $100, then provide a $100 bill & subtract $100
• Is the amount >= $100, then provide a $100 bill & subtract $100
• Is the amount > $20, then provide a $20 bill & subtract $20 [repeat 4
times]
• Is the amount > $10, then provide a $10 bill and subtract $10
• Is the amount > $5, then provide a $5 bill and subtract $5
• Provide the remaining amount in single $1 bills
• Is the amount >= $100, then provide a $100 bill & subtract $100
• Is the amount > $20, then provide a $20 bill & subtract $20 [repeat 4
times]
• Is the amount > $10, then provide a $10 bill and subtract $10
• Is the amount > $5, then provide a $5 bill and subtract $5
• Provide the remaining amount in single $1 bills
so the output should be like shown in picture, and please write the comments (USE C LANGUAGE)
![Enter your name:
b
Would you like to withdraw from (c)hecking or (s) savings?
S
How much would you like to withdraw?
173
Amount in account to be withdrawn from: $325
$100 bill
$ 50 bill
$20 bill
$ 1 bill
$1 bill
$ 1 bill
Amount in account after withdrawl: $152](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F82aefee1-a4fd-40e7-8b3f-97f92bfc6e2a%2Feeb257d6-40f6-47f3-b3d3-1fa07445bba2%2F9n35yj_processed.png&w=3840&q=75)
Transcribed Image Text:Enter your name:
b
Would you like to withdraw from (c)hecking or (s) savings?
S
How much would you like to withdraw?
173
Amount in account to be withdrawn from: $325
$100 bill
$ 50 bill
$20 bill
$ 1 bill
$1 bill
$ 1 bill
Amount in account after withdrawl: $152
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
![Programming with Microsoft Visual Basic 2017](https://www.bartleby.com/isbn_cover_images/9781337102124/9781337102124_smallCoverImage.gif)
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![New Perspectives on HTML5, CSS3, and JavaScript](https://www.bartleby.com/isbn_cover_images/9781305503922/9781305503922_smallCoverImage.gif)
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning