跳到主文
部落格全站分類:圖文創作
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>!!!
}
大神的世界
大神(偽) 發表在 痞客邦 留言(0) 人氣()