当我使用该pow()功能时,有时结果是一个.例如,这段代码产生124,但我知道5³应该是125.
pow()
#include<stdio.h> #include<math.h> int main(){ int i = pow(5, 3); printf("%d", i); }
为什么结果错了?
c math pow calculation
c ×1
calculation ×1
math ×1
pow ×1