Advertisement
kuruku

PrintASCII

Apr 16th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. //Find online more information about ASCII (American Standard Code for Information Interchange) and write
  4. //a program to prints the entire ASCII table of characters at the console (characters from 0 to 255).
  5. //Note that some characters have a special purpose and will not be displayed as expected.
  6. //You may skip them or display them differently. You may need to use for-loops (learn in Internet how).
  7.  
  8. class PrintASCII
  9. {
  10.     static void Main(string[] args)
  11.     {
  12.         char a;
  13.         for (int i = 0; i < 255; i++)
  14.         {
  15.             int unicode = i;
  16.             char character = (char)unicode;
  17.             string text = character.ToString();
  18.             Console.Write("{0}, ", text);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement