- 问答
- 2016-12-21 15:30:30 @
在codeblocks里三段代码输出,请分析结果并说明原因
#include<cstdio>
#include<cmath>
#include<cstring>
int main()
{
int a = 3;
int b = pow(10,a);
printf("%d",b);
return 0;
}
#include<cstdio>
#include<cmath>
#include<cstring>
int main()
{
int a = 3;
int b = pow(10,a-1);
printf("%d",b);
return 0;
}
#include<cstdio>
#include<cmath>
#include<cstring>
int main()
{
int a = 3;
int b = pow(10,a-2);
printf("%d",b);
return 0;
}
4 条评论
-
王中立 LV 4 @ 2017-01-16 18:44:06
![pic=10]
-
2017-01-13 11:26:44@
double pow (double base, double exponent);
-
2016-12-25 08:28:27@
你可以试试%.0lf
-
2016-12-21 17:08:34@
请您提供结果
- 1