Simooo

Untitled

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