Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write a program that computes the net amount of a bank account based a transaction log from console input. The transaction log format is shown as following:
- D 200
- W 100
- ยก
- D means deposit while W means withdrawal. 'i' meaning balance information
- Suppose the following input is supplied to the program:
- D 300
- D 300
- W 200
- D 100
- ยก
- Then, the output should be:
- 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement