[問題] 如何換成十進位呢

看板C_and_CPP作者 (derange)時間12年前 (2012/07/05 00:24), 編輯推噓1(102)
留言3則, 3人參與, 最新討論串1/1
CPP 請問輸入一二進位的數(ex:10010),要怎麼將他換成十進位? (Use the modulus and division operators to pick off the binary number's digits one at a time from right to the left) 因為才剛學cpp,所以能用簡單的方法最好 感激不盡 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.24.177.84

07/05 00:46, , 1F
作業?
07/05 00:46, 1F

07/05 02:13, , 2F
方法都寫給你了不是
07/05 02:13, 2F

07/05 13:01, , 3F
modulus and division operators
07/05 13:01, 3F
文章代碼(AID): #1Fz6vM7s (C_and_CPP)