ranee

Untitled

Jun 15th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Dynamic;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9. namespace CSLight
  10. {
  11.     class Program
  12.     {
  13.         static void Main(string[] args)
  14.         {
  15.             string name;
  16.             string percentSymbol = "%";
  17.             int numberOfLetters;
  18.             Console.Write("Ведите ваше имя:");
  19.             name = Console.ReadLine();
  20.            
  21.             for(int i =0; i < (name.Length + 2); i++ )
  22.             {
  23.                 Console.Write(percentSymbol);
  24.             }
  25.            
  26.             Console.WriteLine();
  27.            
  28.             Console.Write($"{percentSymbol}{name}{percentSymbol}");
  29.            
  30.             Console.WriteLine();
  31.  
  32.             for (int i = 0; i < (name.Length + 2); i++)
  33.             {
  34.                 Console.Write(percentSymbol);
  35.             }
  36.             Console.WriteLine();
  37.  
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment