This isn't the best code as it was thrown together fast, but it should do the job.
Code:
#include <stdio.h>
int main ( void )
{
float Bill;
float Monthly;
float Interest;
int MonthCount = 0;
int Time;
printf("Enter the amount of your total bill:\n");
scanf("%f", &Bill);
printf("Enter the monthly payments you are making:\n");
scanf("%f", &Monthly);
printf("Enter the interest rate you are being charged:\n");
scanf("%f", &Interest);
while ( Bill >= 0 )
{
Bill = Bill-(Monthly * (Interest/100) + Monthly);
MonthCount++;
}
Time = MonthCount/12;
printf("\n\nIt will take you %d months to pay off this debt.\n", MonthCount);
printf("It will take you %d years to pay off this debt.", Time);
return 0;
}