Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. 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:
  2. D 200
  3. W 100
  4. ยก
  5. D means deposit while W means withdrawal. 'i' meaning balance information
  6. Suppose the following input is supplied to the program:
  7. D 300
  8. D 300
  9. W 200
  10. D 100
  11. ยก
  12. Then, the output should be:
  13. 500
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement