会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Jeffxue
Coding is all about the art of communication
博客园
首页
新随笔
联系
订阅
管理
2024年1月3日
C++中 double 类型数据取模
摘要: C++ 中的取模运算符 % 操作数是 int 类型,如果需要对 double 类型的数据进行取模操作,需要使用到 std::fmod(double, double) 如 x 对 y 进行取模操作, #include <cmath> double x = 6.2, y = 5.6; // 返回结果为:
阅读全文
posted @ 2024-01-03 17:26 Jeffxue
阅读(255)
评论(0)
推荐(0)
编辑
公告