Advertisement
Guest User

2.5

a guest
Aug 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Задача_2._5
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int a = 0;
  10. Console.WriteLine("Здравствуйте! Я хотел бы написать ваше имя в прямоугольнике из символа, который вы введёте.");
  11. Console.WriteLine("Введите имя.");
  12. string name = Console.ReadLine();
  13. Console.WriteLine("Задайте символ");
  14. string simvol = Console.ReadLine();
  15. while (a < name.Length + 2)
  16. {
  17. Console.Write(simvol);
  18. a += 1;
  19. }
  20. a = 0;
  21. Console.WriteLine();
  22. Console.Write(simvol);
  23. Console.Write(name);
  24. Console.WriteLine(simvol);
  25. while (a < name.Length + 2)
  26. {
  27. Console.Write(simvol);
  28. a += 1;
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement