Print the decimal, octal, and hexadecimal values of all characters between the start and stop characters entered by a user. For example, if the user enters an a and a z, the program should print all the characters between a and z and their respective numerical values. Make sure that the second character entered by the user occurs later in the alphabet than the first character. If it does not, write a loop that repeatedly asks the user for a valid second character until one is entered. Your output should be formatted as shown below
Question
slaskdkasdasd
Print the decimal, octal, and hexadecimal values of all characters between the start and stop characters entered by a user. For example, if the user enters an a and a z, the program should print all the characters between a and z and their respective numerical values. Make sure that the second character entered by the user occurs later in the alphabet than the first character. If it does not, write a loop that repeatedly asks the user for a valid second character until one is entered. Your output should be formatted as shown below
Letter Decimal Octal Hex
a 97 141 61
b 98 142 62
c 99 143 63
d 100 144 64
e 101 145 65
Thanks...
Link to comment
https://www.neowin.net/forum/topic/1375816-hello-everybody-i-have-a-question-for-while-loop-on-c/Share on other sites
2 answers to this question
Recommended Posts