public class xxx
{
public static void main(
String[] args)
{
System.out.print("Loan Amount: ");
double loanAmount = MyInput.readDouble();
System.out.print("Number of Years: ");
int numOfYears = MyInput.readInt();
System.out.print("Interest Rate: ");
int interestRate = MyInput.readInt();
System.out.println("Payment\t\tInterest\t\tPrincipal\t\tBalance");
System.out.println("-------------------------------------------------------------");
double payment;
double monthlyInterestRate;
double remainingPrincipal;
int paymentNum;
double interest;
double annualInterestRate;
double balance;
//payment #
//numOfYears = paymentNum * 12;
for (numOfYears = paymentNum * 12)
{
//calculate interest
monthlyInterestRate = annualInterestRate / 1200;
interest = monthlyInterestRate * remainingPrincipal;
//calcualte principal
//calcualte balance
System.out.println(paymentNum+"%\t\t\t"+interest+"\t\t\t"
+remainingPrincipal+"\t\t\t"+balance);
}
}
}
--------------
i know. its a mess. the codes are not done.