#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const double PI=3.1415926;
cout.flags(ios::right);//cout.flags取当前状态标志向左还是向右
cout<<setw(10)<<PI<<endl;
cout.fill('*');
cout.width(12);
cout<<PI<<endl;
cout.precision(4);//浮点数的又效个数为4
cout<<PI<<endl;
cout.setf(ios::showpos);//显示正号
cout.precision(4);
cout<<PI<<endl;
cout.unsetf(ios::showpos);
int number;
cout<<"输入一个十进制整数:";
cin>>dec>>number;//输入一个八进制数
cout<<"十进制数number是:"<<dec<<number<<endl;
cout<<"对应的八进制数是:"<<oct<<number<<endl;
cout<<"对应的十六进制数是:"<<hex<<number<<endl;
system("pause");
return 0;
}