Advertisement
PTBGNR

ExamProblem

Jun 30th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 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 DrawPlane
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15.  
  16.  
  17. int firstOuterDots = (n * 3) / 2;
  18. Console.WriteLine("{0}*{0}", new string('.', firstOuterDots));
  19.  
  20.  
  21. int secOuterDots = (n * 3) / 2 - 1;
  22. int secInnerDots = 1;
  23.  
  24. for (int i = 0; i < n - 2; i++)
  25. {
  26. Console.WriteLine("{0}*{1}*{0}", new string('.', secOuterDots),
  27. new string('.', secInnerDots),
  28. new string('.', secOuterDots));
  29. secOuterDots--;
  30. secInnerDots += 2;
  31. }
  32.  
  33.  
  34. int prepreOuterDotss = 3;
  35. int prepreInnerDotss = (n * 3) - 8;
  36. for (int i = 0; i < 1; i++)
  37. {
  38. Console.WriteLine("{0}*{1}*{0}", new string('.', prepreOuterDotss),
  39. new string('.', prepreInnerDotss),
  40. new string('.', prepreOuterDotss));
  41. }
  42.  
  43. int prethOuterDots = 1;
  44. int prethInnerDots = (n * 3) - 4;
  45. for (int i = 0; i < 1; i++)
  46. {
  47. Console.WriteLine("{0}*{1}*{0}", new string('.', prethOuterDots),
  48. new string('.', prethInnerDots),
  49. new string('.', prethOuterDots));
  50. }
  51.  
  52. int thOuterDots = n - 2;
  53. int thInnerDots = n;
  54.  
  55. for (int i = 0; i < 1; i++)
  56. {
  57. Console.WriteLine("*{0}*{1}*{0}*", new string('.', thOuterDots),
  58. new string('.', thInnerDots),
  59. new string('.', thOuterDots));
  60. }
  61.  
  62. int fourthOuterDots = n - 2;
  63. int fourthInerDots = n;
  64. for (int i = 1; i < 1; i++)
  65. {
  66. Console.WriteLine("*{0}*{1}*{0}", new string('.', fourthOuterDots),
  67. new string('.', fourthInerDots),
  68. new string('.', fourthOuterDots));
  69. }
  70.  
  71. int fiveOuterDots = n - 4;
  72. int fiveInnerDots = 1;
  73. int fiveMidDots = n;
  74. for (int i = 0; i < (n / 2) - 1; i++)
  75. {
  76. Console.WriteLine("*{0}*{1}*{2}*{1}*{0}*", new string('.', fiveOuterDots),
  77. new string('.', fiveInnerDots),
  78. new string('.', fiveMidDots),
  79. new string('.', fiveInnerDots),
  80. new string('.', fiveOuterDots));
  81. fiveOuterDots -= 2;
  82. fiveInnerDots += 2;
  83. }
  84.  
  85. int finalOuterDots = n - 1;
  86. int finalMidDots = n;
  87. for (int i = 0; i < n - 1 ; i++)
  88. {
  89. Console.WriteLine("{0}*{1}*{0}", new string('.', finalOuterDots),
  90. new string('.', finalMidDots),
  91. new string('.', finalOuterDots));
  92. finalOuterDots--;
  93. finalMidDots += 2;
  94. }
  95.  
  96. int asterisksksks = n * 3;
  97. for (int i = 0; i < 1; i++)
  98. {
  99. Console.WriteLine("{0}", new string('*', asterisksksks));
  100. }
  101.  
  102. }
  103. }
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement