Do while loop I need serious help | Sololearn: Learn to code for FREE!
0

Do while loop I need serious help

write a program that allows the user to input any hexadecimal characters. the program should continue asking the user to enter characters and end the program if the user stop entering characters. convert each character entered to its decimal equivalent. treat each single inputted character as a separate value. display the original hex value and the corresponding decimal value

22nd Mar 2017, 9:07 AM
Wayne
Wayne - avatar
4 Answers
+ 1
actualy if u want to input a hexadecimal number just start with '0x' and the system will take it as a hexadecimal number. ex- 0x55 means 85 and if you want to input a octal number just start with '0' and the system will take it as a octal number. ex- 075 means 61
22nd Mar 2017, 9:22 AM
Abhishek Basak
Abhishek Basak - avatar
+ 1
ok, will try
22nd Mar 2017, 9:26 AM
Abhishek Basak
Abhishek Basak - avatar
0
can you try to write a code for it
22nd Mar 2017, 9:23 AM
Wayne
Wayne - avatar
0
did you try to do the code
26th Mar 2017, 9:13 PM
Wayne
Wayne - avatar