3_shuangjingdu.cpp

//2012-9-29 16:58:26

#include <iostream>

#include <iomanip>

using namespace std;

int main()
{
	int b = 123456;

	cout<<setiosflags(ios::left)<<b<<endl;
	cout<<hex<<b<<endl;
	cout<<dec<<b<<endl;
	cout<<setw(10)<<b<<','<<b<<endl;
	cout<<setfill('*')<<setw(10)<<b<<endl;
	cout<<setiosflags(ios::showpos)<<b<<endl;

	return 0;
}

/*
--------------------
123456
1e240
123456
123456    ,123456
123456****
+123456
Press any key to continue
--------------------
*/

你可能感兴趣的:(ios)