![]() ![]() String '100' in base 19 is 361 in base 10 String '100' in base 18 is 324 in base 10 String '100' in base 17 is 289 in base 10 ![]() String '100' in base 16 is 256 in base 10 String '100' in base 15 is 225 in base 10 String '100' in base 14 is 196 in base 10 String '100' in base 13 is 169 in base 10 String '100' in base 12 is 144 in base 10 String '100' in base 11 is 121 in base 10 String '100' in base 10 is 100 in base 10 Output: String '100' in base 2 is 4 in base 10 The reverse operation is in task Non-decimal radices/Outputįor general number base conversion, see Non-decimal radices/Convert. "0x" for hexadecimal) or other distinguishing syntax as it parses it, please show that. In particular, if your language has a facility to guess the base of a number by looking at a prefix (e.g. The solutions may assume that the base of the number in the string is known. Parsing of decimal strings is required, parsing of other formats is optional but should be shown (i.e., if the language can parse in base-19 then that should be illustrated). This task requires parsing of such a string (which may be assumed to contain nothing else) using the language's built-in facilities if possible. Such strings are found in many places (user interfaces, configuration files, XML data, network protocols, etc.) It is common to have a string containing a number written in some format, with the most common ones being decimal, hexadecimal, octal and binary. You are encouraged to solve this task according to the task description, using any language you may know. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |