1. ## Difficult programming problem

I have a problem in understanding a program I am working on so I thought I would see if I could get some help from others. Here is the situation:

The program is designed to to read credit card records and print payoff schedules for the customers. The input records contain an account number, customer name and balance due. For each of the customer i am required to print the account number, and name and then print the customers payment amount and new balance each month until the card is paid off. I am to assume that when a balance reaches \$10 or less the customer can pay off the balance. At the beginning of every month 1.5% interest is added to the balance, then the customeer makes 5% payment of the current balance. Assume the customer makes no new purchases.

I am confused about the logoc and design of the program so any source code or input woul be greatly appreciated.

2. declare iftsream and open it associated with file to be read.

declare variables to hold customers information as per specification sheet.

read in data for a given customer

do math on customers account until balance is under \$10 and then assume final payment of full amount. Use parrameters supplied in specifications.

Display data in neat format. All data for a given customer to be calculated and displayed before moving on to next customer.

repeat process for all customers (until end of file has been reached).

math is:
while owed > 10.00
owed = (owed * 0.015) - (owed * 0.05);

3. alternate math could be

while owed > 10.00

owed *= 0.015;//add interest before deducting payment
owed *= 0.95;//amount owed after payment

or if you want to keep track of interest payed and total payments

while owed > 10.00
interest = owed * 0.015
total interest to date += interest;
owed += interest;
payment = owed * 0.05;
total payments to date += payment;
owed *= 0.95;

4. you could use a structure to organise the user information i.e:

struct sAccountData
{
long int AccountNo;
char CustName[40];
float Balance;
};

then using file i/o you would get the user to input all the cutomers details which would be saved to a text file for use later.