Advertisement
Rodunskiy

Untitled

May 8th, 2024
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSLight
  4. {
  5.     public class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("Введите имя:");
  10.             string name = Console.ReadLine();
  11.  
  12.             Console.WriteLine("Введите символ:");
  13.             char symbol = Convert.ToChar(Console.ReadLine());
  14.  
  15.             for (int i = 0; i < name.Length + 2; i++)
  16.             {
  17.                 Console.Write(symbol);
  18.             }
  19.  
  20.             Console.WriteLine("\n" + symbol + name + symbol);
  21.  
  22.             for (int i = 0; i < name.Length + 2; i++)
  23.             {
  24.                 Console.Write(symbol);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement