Advertisement
bonumopus

output name

Apr 11th, 2020
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 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 outputname
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string inputName;
  14.             string inputSign;
  15.  
  16.             Console.Write("ВВедите имя: ");
  17.             inputName = Console.ReadLine();
  18.             Console.Write("ВВедите символ: ");
  19.             inputSign = Console.ReadLine();
  20.  
  21.             for (int i = 0; i < inputName.Length + 2; i++)
  22.             {
  23.                 Console.Write(inputSign);
  24.             }
  25.             Console.WriteLine();
  26.             Console.WriteLine(inputSign + inputName + inputSign);
  27.  
  28.             for (int i = 0; i < inputName.Length + 2; i++)
  29.             {
  30.                 Console.Write(inputSign);
  31.             }
  32.             Console.WriteLine();
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement