I am a beginner in c programming, and I would be very very grateful if someone coule take a look at my little program which I wrote and which unfortunately does not really work.
The program calculates the running time and the annuity of a credit, after receiving the necessary values.
However, the formula for the running time does not work. I tried to rewrite this formula, maybe I have made a mistake:
in my programm n is the running time, R is the annuity, S is the amount of the credit, m is the fixed fee and i is the lending rate in per cent.
double R = 12*m;
int n = -(log(1-(i*S/R))/log(1+i));
Fill in a value for S: ");
Fill in a value for m: ");
Fill in a value for i: ");
The annuity is %.2lf",annuity());
The running time is %i
Thank you in advance and sorry for my bad english!