//Ex6_23.cpp
#include "iostream" 
#include "iomanip"
using namespace std;
void main() 
{int x=30; 
 cout<<"x="<<x<<oct<<",x="<<x<<hex<<",x="<<x<<endl;
 cout<<setbase(10)<<"x="<<x<<setbase(8)<<",x="<<x<<setbase(16)<<",x="<<x<<endl;
 cout<<showbase;   //显示数制标志0、0x
 cout<<setbase(10)<<"x="<<x<<oct<<",x="<<x<<hex<<",x="<<x<<endl;
 cout<<setiosflags(ios::showbase|ios::uppercase);  //显示数制标志并大写
 cout<<setbase(10)<<"x="<<x<<oct<<",x="<<x<<hex<<",x="<<x<<endl;
 cout<<noshowbase;   //不显示数制标志0、0x
 cout<<setbase(10)<<"x="<<setw(9)<<x<<endl;
 cout<<setbase(10)<<"x="<<setw(9)<<left<<x<<endl;
 cout<<setbase(10)<<"x="<<setfill('*')<<right<<setw(9)<<x<<endl;
}
