Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- string name = Console.ReadLine();
- Console.Write("Your name according to ASCII: ");
- foreach (char ch in name)
- {
- Console.Write((int)ch);
- }
- Console.WriteLine();
- foreach (char ch in name)
- {
- Console.WriteLine("Char {0} is {1} according to ASCII", ch, (int)ch);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement