alexey3017

Консоль

Mar 20th, 2020
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string name;
  14.             char symbol = '@';
  15.  
  16.             Console.WriteLine("Введите ваше имя:");
  17.             name = Console.ReadLine();
  18.             Console.Clear();
  19.             Console.SetCursorPosition(10, 10);
  20.  
  21.             for (int i = 0; i < name.Length + 4; i++)
  22.             {
  23.                 Console.Write(symbol);
  24.             }
  25.  
  26.             Console.SetCursorPosition(10, 12);
  27.             Console.Write(symbol);
  28.  
  29.             Console.SetCursorPosition(12, 12);
  30.             Console.Write(name);
  31.  
  32.             Console.SetCursorPosition(10 + name.Length + 3, 12);
  33.             Console.Write(symbol);
  34.  
  35.             Console.SetCursorPosition(10, 14);
  36.             for (int i = 0; i < name.Length + 4; i++)
  37.             {
  38.                 Console.Write(symbol);
  39.             }
  40.         }
  41.     }
  42. }
Add Comment
Please, Sign In to add comment