Advertisement
Sininerebane

Untitled

Sep 18th, 2023
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | Software | 0 0
  1. namespace TriangleSymbol
  2. {
  3.     internal class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             Console.OutputEncoding = Encoding.UTF8;
  8.  
  9.             string symbol;
  10.             string name;
  11.             string symbolAndName;
  12.             string frame;
  13.            
  14.             Console.WriteLine("Введите свое имя");
  15.             name = Console.ReadLine();
  16.             Console.WriteLine("Введите символ");
  17.             symbol = Console.ReadLine();
  18.            
  19.             frame = "";
  20.             symbolAndName = symbol +  name + symbol;
  21.            
  22.             for (int i = 0; i < symbolAndName.Length; i++)
  23.             {
  24.                 frame += symbol;
  25.             }
  26.  
  27.             Console.Write(frame);
  28.             Console.WriteLine("\n" + symbolAndName);
  29.             Console.Write(frame);
  30.             Console.ReadKey();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement