CrewLab

Untitled

May 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 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 day_00
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int     len;
  14.             int     counter;
  15.             char    sym;
  16.             string  str;
  17.  
  18.             counter = 0;
  19.             Console.Write("Привет! Введи своё имя: ");
  20.             str = Console.ReadLine();
  21.             Console.Write("Отлично! Введи любой символ, букву или цифру: ");
  22.             sym = Convert.ToChar(Console.Read());
  23.             len = str.Length + 4;
  24.             while (counter++ < len)
  25.                 Console.Write(sym);
  26.             Console.Write("\n" + sym + " " + str + " " + sym + "\n");
  27.             counter = 0;
  28.             while (counter++ < len)
  29.                 Console.Write(sym);
  30.             Console.Write("\n");
  31.         }
  32.     }
  33. }
Add Comment
Please, Sign In to add comment