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

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is a simple C console application that meets your requirements using System class Program stat... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!