GPbl3YH

CSLight #10

Jan 27th, 2021 (edited)
290
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 CSLight
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Введите имя:");
  14.             string username = Console.ReadLine();
  15.             Console.WriteLine("Введите символ:");
  16.             string sign = Console.ReadLine();
  17.  
  18.             for (int i = 0; i < username.Length + 2; i++)
  19.             {
  20.                 Console.Write(sign);
  21.             }
  22.  
  23.             Console.Write("\n" + sign);
  24.  
  25.             for (int i = 0; i < username.Length; i++)
  26.             {
  27.                 Console.Write(username[i]);
  28.             }
  29.  
  30.             Console.Write(sign + "\n");
  31.  
  32.             for (int i = 0; i < username.Length + 2; i++)
  33.             {
  34.                 Console.Write(sign);
  35.             }
  36.  
  37.             Console.ReadKey();
  38.         }
  39.     }
  40. }
Add Comment
Please, Sign In to add comment