Hey guys, new to the board and C programming in general. I have this assignment that's giving me problems, don't know what's wrong.
Monthly Pay=[ rate + rate /([1+rate]^months -1)] X principle
Where rate of %6 means 6/1200
Months means number of years x 12
"Possible data to test:
Term in years 5
Monthly payment is: 241.57"
For my monthly payment I always end up getting half of what is expected. Any ideas?
void main ()
double princ, rate, term, monthly;
printf("Please enter the the principle on your payment: ");
printf("Please enter the rate on your payment: ");
printf("Please enter the term of your payment in years: ");
rate = (rate/1200);
term = (term*12);
monthly = ((rate + (rate/(pow((1 + rate),(term-1))))) * princ);
printf("Your monthly payment is: %f", monthly);