close
#include <iostream>
/*hexoct----shows value inhex and octal */
using namespace std;
int main( )
{
int chest=42;
int waist=42;
int inseam=42;
cout<<"Monsieur cuts a striking figure!\n";
cout<<"chest="<<chest<<"(decimal)"<<endl;
cout<<hex;
cout<<"waist="<<waist<<"hexadecimal"<<endl;
cout<<oct;
cout<<"inseam="<<inseam<<"(octal)"<<endl;
return 0;
}
顯示結果:
Monsieur cuts a striking figure!
chest=42(decimal)
waist=2ahexadecimal
inseam=52(octal)
全站熱搜
留言列表