Code:
This is what I have so far, but i dont know how to make it into a table.
/*#include <stdio.h>
int main (void)
{
/*float loan_amount, interest_rate, monthly_payment, monthly_amount, interest;
int n, i=1;
printf("\n Payment Schedule for $1000 loan \n"
" at 0.125 annual interest rate \n"
" and monthly payment of $100.00 \n");
/*scanf("%i", &loan_amount);
printf("Enter Interest rate:");
scanf("%f", &interest_rate);
printf("Enter Monthly Payment:");
scanf("%f", &monthly_payment);
printf("Enter number of payments:");
scanf("%d",&n);
while(loan_amount>0 && i<=n)
{
interest = loan_amount*interest_rate/12;
monthly_amount = (loan_amount+interest - monthly_payment);
if(monthly_amount>0)
printf("Balance remaing after %d payment: $ %.2f\n",i, monthly_amount);
loan_amount = monthly_amount;
i++;
}
return 0;
}*/