Question
Write a C program that will update a bank balance. A user cannot withdraw an amount of money that is more than the current balance.
Write a C program that will update a bank balance. A user cannot withdraw an amount of money
that is more than the current balance. The current balance must always be non-negative value.
The variable types must be selected wisely. A sample run is below. The users response is in boldface.
BANK ACCOUT PROGRAM
!
--------------------
Enter the old balance:
1234.50
Enter
the transactions now.
Enter an F for the transaction type when you are finished.
Transaction Type (D=deposit, W=withdrawal, F=finished):
D
Amount:
568.34
Transaction Type (D=deposit, W=withdrawal, F=finished):
W
Amount:
25.68
Transaction Type (D=deposit, W=withdrawal, F=finished):
W
Amount:
167.40
Transaction Type (D=deposit, W=withdrawal, F=finished):
F
Your ending balance is $1609.76
Program is ending
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started