• 100% Satisfaction Guarantee
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
ATLPROG is online now

# Write a C program that allows the user to make some simple

### Customer Question

Write a C program that allows the user to make some simple banking transactions.
The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents, not less than zero). The program should then prompt the user to enter the number of withdrawals to make, and then the number of deposits to make.
For this assignment, let's set a maximum of 5 deposits and 5 withdrawals, you'll see why as you read on.
Using a loop, the program should then prompt the user to enter the amount of the first deposit (a positive amount to add to the bank account balance), the amount of the second deposit, the third, etc., until the number of deposits have been processed.
Using a second loop, the program should then prompt the user to enter the amount of the first withdrawal (a positive amount to subtract from the bank account balance, if possible), the amount of the second withdrawal, the third, etc. until the number of withdrawals have been processed.
Once all deposits and withdrawals have been made, the program should output the ending balance.
The dialog with the user should look like the following:
Welcome to the Computer Banking System
Enter your current balance in dollars and cents: 256.40
Enter the number of deposits (0 - 5): 3
Enter the number of withdrawals (0 - 5): 2
Enter the amount of deposit #1: 10.50 Enter the amount of deposit #2: 12.25 Enter the amount of deposit #3: 125.30
Enter the amount of withdrawal #1: 120.35 Enter the amount of withdrawal #2: 35.60
*** The closing balance is \$248.50 ***
The program should also output one of the following messages based on the closing balance. That is:
 If the closing balance is greater than or equal to 50000.00, output: "*** It is time to invest some money! ***"  If the closing balance is between 15000.00 and 49999.99, output: "*** Maybe you should consider a CD. ***"  If the closing balance is between 1000.00 and 14999.99, output: "*** Keep up the good work! ***"  If the closing balance is between 0.00 and 999.99, output: "*** Your balance is getting low! ***"
Submitted: 4 months ago.
Category: Programming
Expert:  LogicPro replied 4 months ago.

Hi

Welcome back.