dmndxld

码不停题

2021年1月30日

c++小数点后舍入

摘要: c++ math.h中有这么几种函数:round,floor,ceil,trunc round提供四舍五入,floor向下取整,ceil向上取整,trunc截断 例子 /* round vs floor vs ceil vs trunc */ #include <stdio.h> /* printf 阅读全文

posted @ 2021-01-30 10:28 imyourterminal 阅读(390) 评论(0) 推荐(0) 编辑

导航