28_下面是整数输出的例子.cpp

来源:互联网 发布:nba官方网站软件 编辑:程序博客网 时间:2024/06/03 22:24
//2007年9月29日12:58:22#include <iostream>#include <iomanip>using namespace std;int main(){int b = 123456;cout<<b<<endl;cout<<hex<<b<<endl;cout<<setiosflags(ios::uppercase)<<b<<endl;cout<<setw(10)<<b<<','<<b<<endl;cout<<setfill('*')<<setw(10)<<b<<endl;cout<<setiosflags(ios::showpos)<<b<<endl;return 0;}/*在VC++6.0中运行的结果是:-------------------------1234561e2401E240     1E240,1E240*****1E2401E240Press any key to continue-------------------------*/