this is a program i wrote to count the compound interest, but it's not working it's giving me following error message when i compile
"compound.c:(.text+0x69): undefined reference to `pow'
collect2: ld returned 1 exit status"
following the code
Code:#include <stdio.h> #include <math.h> int mian() { int rate; int amount; int p; int n; p=24; printf("Rate\t\tAmount"); for(rate=5;rate<=10;rate++){ for(n=1; n<=381; n++){ amount=p*pow(1+(rate/100),n); printf("%d\t\t%d", rate,amount); } } return 0; }