C programming assignment: write a code

 The menu items in this assignment are about simple sample of a bank account.
Here are the menu items:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

1. Show Balance: the balance info would be stored in a variable declared in main

2. Make a Deposit: ask the user for the amount to deposit then call function Deposit to return the new balance. Deposit uses two parameters. The first represents the current balance and the second represents the amount to be deposited. The function rejects any deposit of 10,000.00 or more, or a deposit amount of 0 or less. Example of the code from main: current_balance = deposit(current_balance,amount)

3. Make a Withdrawal: ask the user for the amount to withdraw then call function Withdraw to return the new balance. Withdraw uses two parameters. The first represents the current balance and the second represents the amount to be withdrawn. The function rejects any withdrawals of amounts 0 or less, or amounts that cause the balance to be less than 10. Return the new balance.

4. Quit. In this case show a message: Press Enter to continue then end the application when the user presses the enter key.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Remember, if the choice made is not 1 to 4, show an error message asking the user to enter numbers 1 to 4, and to try again + Press Enter to continue then repeat the menu.

Do not use goto or break statements.
Menu items are typically processed using a switch statement. Using break inside a switch statement is always OK to ensure the other choices are not considered.

Still stressed with your coursework?
Get quality coursework help from an expert!