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)

arrow
arrow
    全站熱搜

    布拉怡 發表在 痞客邦 留言(0) 人氣()