lg符号怎么编译的,怎样才能弄正确?电脑显示D:\Microsoft Visual Studio\MyProjects\算数\1.cpp(5) : error
#include <stdio.h>int main()
{
float d=300000,p=6000,r=0.01,m;
m=lg10(p/(p-d*r))/lg10(1+r);
printf("m=%6.1f\n",m);
return 0;
}
#include <stdio.h> #include <math.h> int main() { float d=300000,p=6000,r=0.01,m; m=log(p/(p-d*r))/log(1+r); printf("m=%6.1f\n",m); return 0; }