需要加上“#include <math.h>”
#include <stdio.h> #include <math.h> int main() { float p, r, n; n=10; r=0.07; p=pow(1+r, n); printf("p=%f\n",p); return 0; }