Skip to content

Instantly share code, notes, and snippets.

@Rahajustone
Created March 18, 2014 18:42
Show Gist options
  • Save Rahajustone/9626608 to your computer and use it in GitHub Desktop.
Save Rahajustone/9626608 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void) {
float a,b,c;
float i,l,k;
printf("Enter the amount of the loan:");
scanf("%f",&a);
printf("Enter interested rate:");
scanf("%f",&b);
printf("Enter monthly payment:");
scanf("%f",&c);
i=(a-c)+(a*b)/1200;
l=(i-c)+(i*b)/1200;
k=(l-c)+(l*b)/1200;
printf("Balance remaining after first payment:%.2f\n",i);
printf("Balance remaining after second payment:%.2f\n",l);
printf("Balance remaining after third payment:%.2f\n",k);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment