C\C++ 向下\向上取整函數 floor() ceil()

floor(x)向下取整,返回一個<=x的int整型。ios ceil(x)向上取整,返回一個>=x的int整型。 spa 頭文件是<cmath>或<math.h>code <pre name="code" class="cpp">#include "stdafx.h" #include<iostream> #include<cmath> using namespace std; int _tma
相關文章
相關標籤/搜索