Advertisement
Lamms

KameliyaPlane

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