取整函数(向上取整 向下取整 四舍五入)

取整函数(在#include<math.h>之下) Floor() 会取不大于自变量的最大整数,这样自变量是3.1或3.9是没有区别的,返回都是3;自变量是-2.1或-2.9也是没有区别的,返回都是-3;(向下取整)ios #include<iostream> #include<algorithm> #include<map> #include<math.h> #include<string> u
相关文章
相关标签/搜索