Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Tel
- {
- public static void Main()
- {
- string tel = "(+359) ";
- Console.Write("{0}", tel);
- ConsoleKeyInfo key;
- int count = 0;
- do
- {
- key = Console.ReadKey();
- tel += key.KeyChar;
- count++;
- int x = tel.Length;
- if (count > 2 && count % 2 == 1)
- {
- Console.SetCursorPosition(x + 1, 0);
- tel += " ";
- }
- } while (key.Key != ConsoleKey.Enter && count < 9);
- Console.WriteLine();
- Console.WriteLine(tel);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement