You are using the forumula incorrectly
you can check this code prints 4.41 if you want:
Amount = $1.00 * ( 1 + (.16/1)) 10*1Code:#include <math.h> #include <stdio.h> #define P 1.0 //principal = $1.00 #define N 10.0 // number of years = 10 #define I .16 // annual interest rate 16% -- ie., 16/100 #define Q 1.0 // number of payments per year // this prints 4.41 int main(){ double A; A = P* pow((1+ (I/Q)), N * Q); printf("total= %f\n",A); return 0; }




Reply With Quote