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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!