Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone answers this Problem3 Write a program that simulates a checking account. Initially, the program prompts the user to open an account and deposit

image text in transcribedCan anyone answers this
Problem3 Write a program that simulates a checking account. Initially, the program prompts the user to open an account and deposit an initial balance of at least $20. Afterwards, the program repeatedly shows a menu with the following options: Checking Account 19 points Depositing money 2. 1. Withdrawing money 3. Viewing the current balance 0. Exit Split your program using functions. Define the following prototypes and implement them below the main: Ishows menu, prompts for and returns valid option int promptoption Oi prompts for amount 0) to deposit and adds it to the balance void deposit (float &balance) prompts for amount 0) to withdraw and //subtracts it from the balance void withdraw(float &balance) You may use #include to output the correct number of decimal places. You don't need to validate the correct number of decimal digits of the input. Example: Open Account How much would you like to deposit? (at least $20): 10 Invalid! Enter a value (at least $20)25 Menu 1 Deposit money 2 Withdraw money 3 View balance 0 exit Select an option: 4 Invalid! Select an option: 1 --DE POSIT-- Amount: 0 Invalid! Enter an amount larger than 0: 5 Menu 1 Deposit money 2 Withdraw money 3 View balance 0 exit Select an option: 3 Balance: $20.00 Menu 1 Deposit money 2 Withdraw money 3 View balance 0 exit Select an option:0 Goodbye! Menu 1 Deposit money 2 Withdraw money 3 View balance 0 exit Select an option: 2 -WITHDRAWAL Amount:-10 Invalid! Enter an amount larger than 0: 10

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

Compare and contrast families and family roles across cultures

Answered: 1 week ago

Question

=+industrial action Under what circumstances can unions strike?

Answered: 1 week ago

Question

=+What forms of industrial action are common?

Answered: 1 week ago