摘要: C++——向上向下取整 本次博客,我将记录c++中的向上和向下取整 如果要使用c++自带的取整和四舍五入函数,则须要包含头文件 #include<cmath> 下面贴出代码即可说明: //向下取整 cout<<"(int)1.2="<<(int)1.2<<endl; cout<<"(int)1.8="<<(int)1.8< 阅读全文
posted @ 2022-07-28 11:02 Sky6634 阅读(2282) 评论(0) 推荐(0)