Advertisement
OldBeliver

Cycles_06

Mar 8th, 2021 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 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 CSharpCycles06
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string userName;
  14.             string anySymbol;
  15.             int length;
  16.             Console.WriteLine("Гробовых дел мастер Безенчук.");
  17.             Console.Write("Какое имя хотите увековечить? : ");
  18.             userName = Console.ReadLine();
  19.             Console.Write("Из каких символов делать рамку? :");
  20.             anySymbol = Console.ReadLine();
  21.             length = userName.Length;            
  22.             for (int i =0; i < length + 4; i++)
  23.             {
  24.                 Console.Write(anySymbol);
  25.             }            
  26.             Console.Write($"\n{anySymbol} {userName} {anySymbol}\n");
  27.             for (int i = 0; i < length + 4; i++)
  28.             {
  29.                 Console.Write(anySymbol);
  30.             }
  31.             Console.ReadKey();
  32.         }
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement