float loan, rate, payment;
printf("Enter amount of loan: ");
scanf("%f", &loan);
printf("rate: ");
scanf("%f", &rate);
printf("payment: ");
scanf("%f", &payment);
rate = rate * 0.01 / 12;
loan = loan + loan * rate - payment;
printf("first payment: $%.2f\n", loan);
loan = loan + loan * rate - payment;
printf("second $%.2f\n", loan);
loan = loan + loan * rate - payment;
printf("third $%.2f\n", loan);