while döngüsünü kullanarak programı çalıştırma
float balance = 8000.0;
interest = balance * 0.10 / 12;
payment = 300 - interest;
new_balance = balance + interest - 300;
printf("Beginning Balance\t Interest Payment\t Principal Payment\t Ending Loan Balance\n");
printf("%f\t\t %f\t\t %f\t\t %f\n", balance, interest, payment, new_balance);
The balance on Rhona Karp's car loan is $8,000.Each month Rhona is required to make a payment of $300, which includes both interest and principal repayment of the car loan.
The monthy interest is calculated as 0.10/12 of the balance of the loan.
After the interest is deducted the remaining part of the payment is used to payoff the loan.
Using this information, write a C program that produces a table indicating the beginnig monthly balance, the interest payment, the principal payment, and the remaining loan balance after each payment is made. Your output should resemble and complete the entries in the following table until the loan balance is zero.