Question: Extra Credit Only.Just a simple Java program. Thanks Write a program that user enters 4 position hexadecimal number and you output the decimal value along

Extra Credit Only.Just a simple Java program. Thanks
Write a program that user enters 4 position hexadecimal number and you output the decimal value along with hexadecimal value. Thus 4A7C would output "Hexadecimal 4A7C equals decimal 19068". You can NOT use any commands to convert text to numbers. Pseudocode: input 4 digit hexadecimal number as string get each character at each position and calculate decimal number 4 A 7 C 4 163 10*162+ 7*16112* 160 4-charAt(0) 10- charAt(1) 7- charAt(2) 12-charAt(3) HINT: Math.pow(16,indexK) is the same as 16indexk output input string as well as decimal value - see example above. Do NOT use any command that converts text string to number (e.g., parse) EXTRA CREDIT- MAKE PROGRAM READ IN HEXADECIMAL NUMBER ANY LENGTH
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
