Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ASCII table generator
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Console.Write("Decimal".PadRight(10)); Console.Write("ASCII".PadRight(10)); Console.Write("Hex".PadRight(10)); Console.WriteLine(); int min = 0; int max = 128; for (int i = min; i < max; i++) { // Get ASCII character. char c = (char)i; // Get display string. string display = string.Empty; if (char.IsWhiteSpace(c)) { display = c.ToString(); switch (c) { case '\t': display = "\\t"; break; case ' ': display = "space"; break; case '\n': display = "\\n"; break; case '\r': display = "\\r"; break; case '\v': display = "\\v"; break; case '\f': display = "\\f"; break; } } else if (char.IsControl(c)) { display = "control"; } else { display = c.ToString(); } // Write table row. Console.Write(i.ToString().PadRight(10)); Console.Write(display.PadRight(10)); Console.Write(i.ToString("X2")); Console.WriteLine(); } } } }
run
|
edit
|
history
|
help
0
breadbank
6.2 Parallelism: locks
Main Math
Talk To Jack
4 squares theorem
Armstrong
Find Highest,Lowest and average using two dimensional arrays
Accessit SalaryCalculation
Just tries to add/remove items to the list
b