floor

就是向下取整

在这里插入代码片
#include<stdio.h>
#include<math.h>
int main(void)
{
 double a = 34.4;
 printf("%.2f",floor(a));
 return 0;
}

上图
在这里插入图片描述

发布了147 篇原创文章 · 获赞 44 · 访问量 4148

猜你喜欢

转载自blog.csdn.net/weixin_45949073/article/details/103932921
今日推荐