Input from a file using statistical calculations

In my computer class we have an assignment where we are supposed to read from a file the account number, annual interest rate for the account, starting balance, the number of months that the account has been open

the statistics are as follow

ACCT# Int R Balance Months Deposit WithD Deposit

3456 0.03 1256.89 4 0.00 56.00 100.00

WithD Deposit WithD

0.00 100.00 75.00

*One deposit and one Deposit WithD

withdrawal for each month* 200.00 50.00

there are 5 lines just like this one above and i am supposed to figure out the total deposits, total withdrawls, Total interest gained, show the final balance and the account number for each individual line and output them all to a file. If anyone can help me with this i would greatly appreciate it Thanks, Mike

Input from a file using statistical calculations

In my computer class we have an assignment where we are supposed to read from a file the account number, annual interest rate for the account, starting balance, the number of months that the account has been open

the statistics are as follow

ACCT# Int R Balance Months Deposit WithD Deposit

3456 0.03 1256.89 4 0.00 56.00 100.00

WithD Deposit WithD

0.00 100.00 75.00

Deposit WithD

200.00 50.00

There is one deposit and one withdrawal for each month

there are 5 lines just like this one above and i am supposed to figure out the total deposits, total withdrawls, Total interest gained, show the final balance and the account number for each individual line and output them all to a file. If anyone can help me with this i would greatly appreciate it Thanks, Mike

Re: Input from a file using statistical calculations

Quote:

*Originally posted by cuttlefishkarl *

**In my computer class we have an assignment where we are supposed to read from a file the account number, annual interest rate for the account, starting balance, the number of months that the account has been open**

the statistics are as follow

ACCT# Int R Balance Months Deposit WithD Deposit

3456 0.03 1256.89 4 0.00 56.00 100.00

WithD Deposit WithD

0.00 100.00 75.00

*One deposit and one Deposit WithD

withdrawal for each month* 200.00 50.00

there are 5 lines just like this one above and i am supposed to figure out the total deposits, total withdrawls, Total interest gained, show the final balance and the account number for each individual line and output them all to a file. If anyone can help me with this i would greatly appreciate it Thanks, Mike

This is homework. Write a program that *attempts* to solve the problem. If something breaks, and you can't fix it - ask for help. But try to do your own work please.