Write a console application that asks the user to enter a string of characters. Then, in a
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a console application that asks the user to enter a string of characters. Then, in a do loop, use Console. Read() to read each character from the input stream and then describe that character (see Details below). End the loop when the '' character is encountered.
Details:
- Display the ascii code (the integer value of the character)
- Display the character if it is printable (that is, not a whitespace character and not a control character)
- For whitespace characters, print "TAB", "LF", "CR" or "SPACE". Print "Whitespace" for all others.
- Display the description ("Digit", "Control" or "Letter")
I've been combing through the book for a few hours and haven't found anything to help me get started. The sample output will be below.
I need help getting the loop set up.
Sample run:
Please enter a string of characters AZ az 09 ^Q^W
65 A Letter 90 Z Letter 32 SPACE 97 a Letter 122 z Letter 9 TAB 48 0 Digit 57 9 Digit 9 TAB 17 Control 23 Control 13 CR 10 LF
Related Book For
Posted Date: