Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CSLight
- {
- class Menu
- {
- static void Main(string[] args)
- {
- string name;
- char symbol;
- Console.Write("Введите свое имя: ");
- name = Console.ReadLine();
- Console.WriteLine("");
- Console.Write("Введите желаемый символ: ");
- symbol = Convert.ToChar(Console.ReadLine());
- int posX_1 = 0;
- int symCount = name.Length + 2;
- while(posX_1 < symCount)
- {
- Console.SetCursorPosition(posX_1, 5);
- Console.Write(symbol);
- posX_1++;
- }
- Console.WriteLine();
- Console.WriteLine(symbol + name + symbol);
- int posX_2 = 0;
- while (posX_2 < symCount)
- {
- Console.SetCursorPosition(posX_2, 7);
- Console.Write(symbol);
- posX_2++;
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement