首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

一个输出的有关问题

2012-02-28 
一个输出的问题#include stdio.hmain(){doublef632.23234235printf( thetypeofthisvariableisfloat.(

一个输出的问题
#include <stdio.h>
main()
{
double   f=632.23234235;
printf( "the   type   of   this   variable   is   float.(%5f)\n ",f);
}
为什么输出了小数点后6位而不是五位?

[解决办法]
%x.yf
输出x位整数部分,y位小数部分

热点排行