Chinaunix首页 | 论坛 | 博客
  • 博客访问: 20059
  • 博文数量: 1
  • 博客积分: 130
  • 博客等级: 入伍新兵
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-03 12:20
文章分类

全部博文(1)

文章存档

2009年(1)

我的朋友
最近访客

分类: C/C++

2009-08-18 10:44:15

#include <iostream>
#include <iomanip>
using namespace std;

int main(int argc, char* argv[])
{
 double a = 99.1234567;

 cout <<a <<endl; //

 cout <<setprecision(4) <<a <<endl;
 cout <<fixed <<setprecision(4) <<a <<endl;
 cout <<setprecision(4) <<a <<endl;
 cout.unsetf(ios::fixed);
 cout <<setprecision(4) <<a <<endl;
 return 0;
}

阅读(343) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:没有了

给主人留下些什么吧!~~