Non-decimal radices/Input: Difference between revisions
Content added Content deleted
(→{{header|Go}}: Use Sscanf rather than a bytes.Buffer, the comment already indicates Fscanf is more common; io.Reader vs file in comment; mention fmt scanning can work with any type and show it with big.Int) |
m (→{{header|Go}}: typo/nit: math/big.SetString supports up-to base 36 (using [0-9a-zA-Z] for each digit)) |
||
Line 363: | Line 363: | ||
// package math/big: allows conversion from string to big integer. |
// package math/big: allows conversion from string to big integer. |
||
// any base from 2 to |
// any base from 2 to 36 can be specified as second parameter. |
||
var z big.Int |
var z big.Int |
||
z.SetString("111", 3) |
z.SetString("111", 3) |