answer:
所在版块:求学狮城 发贴时间:2003-03-04 11:31

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
#include <iostream.h>
#include <iomanip.h>

int main()
{
double num = 3.6;
cout << setiosflags(ios::fixed | ios::showpoint);
cout << setprecision(2);
cout << num << endl;
}

/*
refer to any iomanip formatting document for c++ io formatting
*/
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!


You may say I'm a dreamer
but I'm not the only one...
 相关帖子 我要回复↙ ↗回到正文
请问c++ cout 格式 的问题 hobo   (138 bytes , 309reads )
answer: simon   (252 bytes , 166reads )
Complement => 魅力十足   (358 bytes , 269reads )