Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- class PrintTheASCIITable
- {
- static void Main()
- {
- Console.OutputEncoding = Encoding.Unicode;
- char symbol = '\u0127';
- char[] asciiMissingChars = {'\u2022', '\u25D8', '\u25CB', '\u25D9'};
- int row;
- Console.WriteLine("{0} = {1}", 0, "null");
- for (row = 1; row < 255; row++)
- {
- if (row > 6 && row < 11)
- {
- for (int i = 0; i < asciiMissingChars.Length; i++)
- {
- Console.WriteLine("{0} = {1}", row, asciiMissingChars[i]);
- row++;
- }
- row = 10;
- }
- else if (row == 13)
- {
- Console.WriteLine("{0} = {1}", row, '\u266A');
- }
- else if (row == 32)
- {
- Console.WriteLine("{0} = {1}", row, "space");
- }
- else if (row > 127 && row < 161)
- {
- Console.WriteLine("{0} = {1}", row, symbol);
- symbol++;
- }
- else if (row == 127)
- {
- Console.WriteLine("{0} = {1}", row, '⌂');
- }
- else
- {
- Console.WriteLine("{0} = {1}", row, (char)row);
- }
- }
- Console.WriteLine("{0} = {1}", 255, "nbsp");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement