Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- namespace OOPFirstLab
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- string value;
- value = Console.ReadLine();
- Console.WriteLine("________________________");
- Console.WriteLine("|Символ| |Код|");
- for (int i = 0; i < value.Length; i++)
- {
- // Convert the string into a byte[].
- byte[] asciiBytes = Encoding.ASCII.GetBytes(value);
- Console.WriteLine("________________________");
- Console.WriteLine("| " + value.Substring(i, 1) + " | as ASCII |" + asciiBytes[i] + "|");
- //Console.WriteLine("________________________");
- }
- Console.WriteLine("________________________");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement