gpt4 book ai didi

C++ pow 函数得到一个奇怪的结果

转载 作者:行者123 更新时间:2023-11-30 01:53:39 24 4
gpt4 key购买 nike

<分区>

使用某些版本的 minGW,以下代码将打印 99。

int high;
high = pow(10,2);
std::cout<<high<<std::endl;

pow函数的参数是double,为什么我得到的是99?谁能告诉我隐藏在 pow 函数中的过程?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com