Advertisement
TargeTPoweR

Untitled

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