code blocks power function is not working in c

前端 未结 5 875
陌清茗
陌清茗 2021-01-26 19:47

i am using code block for learning c. my code is

#include
#include
int main()
{
  int x;
  x = pow(5,2);
  printf(\"%d\", x);
}

Out         


        
5条回答
  •  忘掉有多难
    2021-01-26 20:49

    Using your code i got result 25 which is correct. Although Try changing the data type of result such as float or double.

提交回复
热议问题