#11252: c++ 小技巧


who_am_I (kruztw)


while(cin >> a){

        cout << oct << a << endl;    // 將a以8進位輸出

        cout << hex << a << endl;  // 將a以16進位輸出

       cout << setbase(8 or 10 or 16) << a << endl; //將a以8 或 10 或 16 進位輸出    別忘記 include<iomanip>!!!

}