Advertisement
Lamms

Plane

Jul 31st, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5. //..........*..........
  6. //.........*.*.........
  7. //........*...*........
  8. //.......*.....*.......
  9. //......*.......*......
  10. //.....*.........*.....
  11. //...*.............*...
  12. //.*.................*.
  13. //*.....*.......*.....*
  14. //*...*.*.......*.*...*
  15. //*.*...*.......*...*.*
  16. //......*.......*......
  17. //.....*.........*.....
  18. //....*...........*....
  19. //...*.............*...
  20. //..*...............*..
  21. //.*.................*.
  22. //*********************
  23.  
  24. static void Main(string[] args)
  25. {
  26.  
  27. int n = int.Parse(Console.ReadLine());
  28. int outDots = (3*n-1)/2;
  29. Console.WriteLine("{0}*{0}", new string('.', outDots));
  30. int dots = outDots-1;
  31. int innerDots = 1;
  32. for (int i = 1; i <= (n+2); i+=2)
  33. {
  34. Console.WriteLine("{0}*{1}*{0}", new string('.', dots),
  35. new string('.', innerDots));
  36. dots--;
  37. innerDots+=2;
  38. }
  39. for (int i = 1; i < n-2; i += 2)
  40. {
  41. Console.WriteLine("{0}*{1}*{0}", new string('.',dots-i),
  42. new string('.', innerDots+2*i));
  43.  
  44. }
  45. Console.WriteLine("*{0}*{1}*{0}*", new string('.', n - 2),
  46. new string('.', n));
  47. for (int i = 1; i <n-2; i +=2)
  48. {
  49. Console.WriteLine("*{0}*{1}*{2}*{1}*{0}*", new string('.', n-3-i),
  50. new string('.', i),
  51. new string('.', n));
  52. }
  53. for (int i = 0; i < n-1; i++)
  54. {
  55. Console.WriteLine("{0}*{1}*{0}", new string('.', n-1-i),
  56. new string('.', n+2*i));
  57. }
  58. Console.WriteLine("{0}", new string ('*',3*n));
  59.  
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement