about | help | code help+videos | done | prefs |
Write a method that returns the decimal equivalent of the hexadecimal number represented by the string 'hex'. As preconditions you may assume that 'hex' only contains the symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. You may also assume that 'hex', when converted to decimal, is less than the maximum possible integer value. If 'hex' is an empty string, return zero. quiz2022_03_01_HL_hexToDec("") → 0 quiz2022_03_01_HL_hexToDec("0") → 0 quiz2022_03_01_HL_hexToDec("A000") → 40960 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290
Copyright Nick Parlante 2017 - privacy