How to interpret numbers correctly (hex, oct, dec)
问题 I'm trying to write a program that takes input of - hexadecimals, octals, and decimals -, stores them in integer variables, and outputs them along with their conversion to decimal form. For example: User inputs: 0x43, 0123, 65 Program outputs: 0x43 hexadecimal converts to 67 decimal 0123 octal converts to 83 decimal 65 decimal converts to 65 decimal So obviously I need a way to interpret the numbers, but I'm not sure how to go about doing it. I've tried various methods such as reading them