Public paste
Undefined
By: j00 | Date: Nov 10 2006 21:45 | Format: None | Expires: never | Size: 728 B | Hits: 1529

  1. Write an algorithm and its corresponding program that accepts an ASCII code (a whole number within the range 0-127) and show the corresponding character indicating whether it is a letter, a digit, a symbol, a whitespace character, or an invalid code if the number entered is out of the range.
  2. Use type casting to show the corresponding character (go back to chapter 2 in the textbook). For whitespace characters do NOT try to show it, just indicate that it cannot be shown (see my sample solution).
  3. Your input and output should look exactly like mine. Test your program and mine with the following values to see if both produce the same results: 0, 12, 33, 45, 48, 57, 58, 65, 90, 91, 97, 122, 123, 127, 166, 164, -5, and 251.