C语言有以下几种取整方法:

C语言有以下几种取整方法: 
1、直接赋值给整数变量。如:
int i = 2.5; 或 i = (int) 2.5;
这种方法采用的是舍去小数部分
原文地址:https://www.cnblogs.com/monnRedShine/p/3137248.html