在Dev c中运行一下C程序,
#include stdio.h
#include math.h
int main()
{
int a,b;
b=4;
a=pow(10,b);
printf(\"%d\",a);
system(\"pause\");
}
结果是9999
而运行
#include stdio.h
#include math.h
int main()
{
int a,b;
b=4;
a=pow(10,4);
printf(\"%d\",a);
system(\"pause\");
}
结果是10000,而两个小程序,第一个当中只是将pow函数中的“4”替换成了“b”,结果就不一样了,为什么呢?
|