Here's the code:
Code:
#include <stdio.h>

int main(void)
{
	float amount, interest, payment, a;
	int n;
	
	printf("Enter amount of loan: ");
	scanf("%f", &amount);
	printf("Enter interest rate: ");
	scanf("%f", &interest);
	printf("Enter monthly payment: ");
	scanf("%f", &payment);
	printf("Enter number of payments: ");
	scanf("%d", &n);
	

	printf("Balance remaining after %d payments: %2.2f\n", n, a);
	
	return 0;
}
The formula to calculate the balance remaining after 1 payment is: "a = (amount + (interest / 1200) * amount) - payment"
I am not sure how to code this into a loop that will calculate the sum left after n payments. Help me if you can. Thanks in advance :)