Guest User

Untitled

a guest
Aug 17th, 2019
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp84
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string name;
  10. char symbol;
  11.  
  12. Console.WriteLine("Ваше имя?");
  13. name = Console.ReadLine();
  14.  
  15. Console.WriteLine("Укажите символ для обводки текста, например: %");
  16. symbol = Convert.ToChar(Console.ReadLine());
  17.  
  18. for (int i = 0; i < 3; i++)
  19. {
  20. for (int j = 0; j < name.Length + 4; j++)
  21. {
  22. if (i != 1)
  23. {
  24. Console.Write(symbol);
  25. }
  26. else
  27. {
  28. Console.Write(symbol + " ");
  29. Console.BackgroundColor = ConsoleColor.Red;
  30. Console.Write(name);
  31. Console.BackgroundColor = ConsoleColor.Black;
  32. Console.Write(" " + symbol);
  33. break;
  34. }
  35. }
  36. Console.WriteLine();
  37. }
  38. }
  39. }
  40. }
RAW Paste Data