Natalie N.

asked • 12/05/23

A business major gives you a file named accounts. txt that contains transactions of three bank accounts (a sample is shown below). They ask for your help to compute the final balance of each account.

Each line of the file contains a letter, an arrow, and an integer representing one account. A single space separates each value

Contents of accounts. txt:

a < 123

b > 456

с < 78

If the arrow points to the left, money is deposited into that account. If the arrow points to the right, money is withdrawn from that account. For example, the line a < 123 means $123 was deposited into account a. The line b > 456 means $456 was withdrawn from account b. The accounts are named a, b, and c and all three start with a balance of $500.


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.