#include<stdio.h>
int main(void)
{
float loan amount,interest rate,monthly payment,first,second,third,month interest rate;
printf("Enter amount of loan:");
scanf("%.2f",&loan amount);
printf("Enter interest rate:");
scanf("%.1f",&interest rate);
printf("Enter monthly payment:");
scanf("%.2f",&monthly payment);
month interest rate =interest rate /(100*12);
first =loan amount*(1+month interest rate)-monthly payment ;
second =first*(1+month interest rate)-monthly payment;
third =second*(1+month interest rate)-monthly payment ;
printf("Balance remaining after first payment :$%.2f\n",first);
printf("Balance remaining after second payment:$%.2f\n",second);
printf("Balance remaining after third payment:$%.2f\n",third);
return 0;
}