print"\nYear\t\tBalance\t\tInterest\t\tNew Balance\n\n"; $convertInterest = ($annualInterest/100); $year = 2015; while($startAge <= $endAge){ $InterestGained = $startAmount * $convertInterest; $NewBalance = $InterestGained + $startAmount; $Interestrounded = sprintf("%.2f", $InterestGained); $NewBalancerounded = sprintf("%.2f", $NewBalance); $StartAmountRounded = sprintf("%.2f", $startAmount); print"$year"."\t\t"."$StartAmountRounded"."\t\t"."$Interestrounded"."\t\t"."$NewBalancerounded"."\n"; $startAmount = $NewBalance + $yearlyDeposit; $year++; $startAge++; };#ends while loop