# Help wanted for my little program

Hi everyone!

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.

[code]
#include
#include

double R,m,S,i;

double annuity()
{
double R = 12*m;
return R;
}

int term()
{
int n = -(log(1-(i*S/R))/log(1+i));
return n;
}

main()
{
printf("
Fill in a value for S: ");
scanf("%lf",&S);
printf("
Fill in a value for m: ");
scanf("%lf",&m);
printf("
Fill in a value for i: ");
scanf("%lf",&i);

printf("

The annuity is %.2lf",annuity());
printf("
The running time is %i

", term());
}
[/code]