Ruby-chan今天學會了進位轉換的魔法!
他想知道每個數字的:十進位(decimal)、八進位(octal)、十六進位(hexadecimal,小寫 & 大寫),
請幫助Ruby-chan把輸入的數字用魔法一般的c語言顯示出來吧!
由於還未教到輸入(input)的部分,因此請同學直接複製以下程式碼,並且實作輸出(output)的部分即可:
一個十進位的整數*num
Note:
1.0 <= *num <= 2147483647
輸出符合以下格式:
Ruby-chan, haaai! Do you like the number *num*?
More than this number in decimal: *d
More than this number in octal: *o
Even more than this number in hexadecimal: *X or *x
I still like YOU more~
Note:
1. *d, *o, *x, *X分別代表十進位、八進位、十六進位(小寫)、十六進位(大寫)
2.縮排空格為2格
3.輸出最後必須有一個換行符號(”\n”)
4.第一行輸出Ruby-chan, haaai! Do you like the...與第二行More than this number in decimal: 中間有換行符號(”\n”)
5.第五行輸出 Even more than this number in...與第七行I still like YOU more~中間有換行符號(”\n”)