| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 564 人关注过本帖
标题:请各位高手帮忙
取消只看楼主 加入收藏
我为球狂
Rank: 1
等 级:新手上路
帖 子:17
专家分:1
注 册:2008-10-5
收藏
 问题点数:0 回复次数:2 
请各位高手帮忙
#include<stdio.h>
void main()
{
    float x;
    printf("input x:\n");
    scanf("%f",&x);
    printf[un]("%.0f[/un]\n",x);
}                        
                                                                                                                                                                                                                                                                                                                                                                                                                                           那个"%.0f"是什么意思                                                                                                                                                                                                                                                                                                                                                                                                                                         
2008-10-05 11:32
我为球狂
Rank: 1
等 级:新手上路
帖 子:17
专家分:1
注 册:2008-10-5
收藏
得分:0 
谢谢沼泽的指点.
但是这个程序是一个近似整数的输出程序,如15.3和15.6分别输出的是15,16
2008-10-07 18:59
我为球狂
Rank: 1
等 级:新手上路
帖 子:17
专家分:1
注 册:2008-10-5
收藏
得分:0 
原来如此!!!
THANKS !!
2008-10-07 23:09
快速回复:请各位高手帮忙
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.044741 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved