Neon1x1st

nameSimbol

Dec 25th, 2021
1,276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace CSharpLight
  7. {
  8.  
  9.     public static class Program
  10.     {
  11.         public static void Main()
  12.         {
  13.             Console.WriteLine("Введите ваше имя:");
  14.             string name = Console.ReadLine();
  15.             Console.WriteLine("Укажите символ:");
  16.             char simbol = Convert.ToChar(Console.ReadLine());
  17.             int heightMax = name.Length;
  18.             for(int height = -1; height <= heightMax; height++)
  19.             {
  20.                 Console.Write(simbol);
  21.             }
  22.  
  23.             Console.WriteLine("\n" + simbol + name + simbol);
  24.  
  25.             for (int height = -1; height <= heightMax; height++)
  26.             {
  27.                 Console.Write(simbol);
  28.             }
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment