Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4. static void Main()
  5. {
  6. int n = int.Parse(Console.ReadLine());
  7. int tochki = 2 * n + 1;
  8. Console.WriteLine("{0}{1}{0}{2}", '+', new string('~', n - 2), new string ('.', tochki));
  9. tochki--;
  10. Console.WriteLine("{0}{1}{2}{1}{3}", '|', '\\', new string('~', n - 2), new string('.', tochki));
  11. tochki--;
  12. for (int i = 1; i <= (2*n); i++)
  13. {
  14. Console.Write("|");
  15. Console.Write(new string('.', i));
  16. Console.Write("\\");
  17. Console.Write(new string('~', n - 2));
  18. Console.Write("\\");
  19. Console.Write(new string('.', tochki));
  20. Console.WriteLine();
  21. tochki--;
  22. }
  23. tochki = 2 * n; ;
  24. for (int i = 0; i < (2*n)+1; i++)
  25. {
  26.  
  27. Console.Write(new string('.', i));
  28. Console.Write("\\");
  29. Console.Write(new string('.', tochki));
  30. tochki--;
  31. Console.Write("{0}{1}{0}", '|', new string('~', n - 2));
  32. Console.WriteLine();
  33. }
  34. Console.Write(new string('.', 2 * n + 1));
  35. Console.Write("{0}{1}{0}", '+', new string('~', n - 2));
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement