Welcome to this bash script that calculates payments for a hire purchase contract. Please follow the prompts. It will return the figures required to write up the contract. ******Important; Enter whole dollars only and zero for empty fields.****** Do you wish to view a table of payment periods? (y/n) y +---------------------+-------+--------+------------+-------+ | | Years | Months | Fortnights | Weeks | +---------------------+-------+--------+------------+-------+ | | � | 6 | 13 | 26 | | | 1 | 12 | 26 | 52 | | | 1 � | 18 | 39 | 78 | | | 2 | 24 | 52 | 104 | | | 2 � | 30 | 65 | 130 | | | 3 | 36 | 78 | 156 | | Payments per year | 1 | 12 | 26 | 52 | +---------------------+-------+--------+------------+-------+ Enter the purchase price. 10000 Enter the PPI premium. 100 Enter other charges. 0 Enter deposit. 1000 Enter trade in allowance. 2000 Enter the number of payments over the term of the loan 156 Enter the number of payments in a year 52 Enter interest rate. If 12.5%, enter "12.5", not ".125". 12.5 Enter documentation fee. 100 Enter other fixed charges. 25 Enter the date of first payment. Please use the following format yyyymmdd ie 20041231 for 31/12/2004. 20090222 +-------------------------+---------------------------+ | What | Amount | +-------------------------+---------------------------+ | Total gross cost (A) | $10,100 | | Total deposit (B) | $3,000 | | Amount financed (C) | $7,100 | | Number of Installments | 156 | | Interest rate | 12.5% | | Instalment amount | $55.43 | | Interest charged | $1,422.08 | | Cost of credit | $1,547.08 | | Balance payable | $8,647.08 | | First payment date | Sunday 22 February 2009 | | Last payment date | Sunday 12 February 2012 | +-------------------------+---------------------------+