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 Вывод_имени
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name = Console.ReadLine();
- int z = name.Length;
- int Width = z + 4; //Console.WindowWidth;
- int Height = 2; //Console.WindowHeight;
- for (int i = 0; i < Width; i++)
- {
- Console.SetCursorPosition(i, 0);
- Console.Write("*");
- Console.SetCursorPosition(i, Height);
- Console.Write("*");
- }
- for (int i = 1; i < Height; i++)
- {
- Console.SetCursorPosition(0, i);
- Console.Write("*");
- Console.SetCursorPosition(Width - 1, i);
- Console.Write("*");
- }
- Console.SetCursorPosition(2, 1);
- Console.Write(name);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement