简单的四舍五入取整算法

int b=(int)(a+0.5);//  可实现对浮点数a的四舍五入取整

 

posted @ 2015-01-14 14:36  醉卧疆场  阅读(408)  评论(0编辑  收藏  举报