Advertisement
PTBGNR

PlaneProblem

Jun 28th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 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. int outerDots = n + (n / 2);
  15.  
  16.  
  17. Console.Write(new string('.', outerDots));
  18. Console.Write(new string('*', 1));
  19. Console.WriteLine(new string('.', outerDots));
  20.  
  21. int nextOuterDots = n + (n / 3);
  22. int innerDots = 1;
  23. int asterisks = 1;
  24.  
  25. for (int i = 0; i < n - 1; i++)
  26. {
  27. string nextOuterDotsString = new string('.', nextOuterDots);
  28. string innerDotsString = new string('.', innerDots);
  29. string asterisksString = new string('*', asterisks);
  30. Console.WriteLine(nextOuterDotsString + asterisksString + innerDotsString + asterisksString + nextOuterDotsString);
  31. nextOuterDots--;
  32. innerDots += 2;
  33. }
  34. int nekviSiDots = 1;
  35. int vatreshniDots = 11;
  36. string anotherNextOuterDotsStringggg = new string('.', nekviSiDots);
  37. string asteriksiMasteriksi = new string('*', asterisks);
  38. string vatreshniDotsString = new string('.', vatreshniDots);
  39. Console.WriteLine(anotherNextOuterDotsStringggg + asteriksiMasteriksi + vatreshniDotsString + asteriksiMasteriksi + anotherNextOuterDotsStringggg);
  40.  
  41. int asterisksFour = 1;
  42. int firstInnerDots = n - 2;
  43. int secondInnerDotsss = n;
  44. for (int i = 0; i < n / 3; i++)
  45. {
  46. string asterisksFourString = new string('*', asterisksFour);
  47. string firstInnerDotsString = new string('.', firstInnerDots);
  48. string secondInerDotrsssString = new string('.', secondInnerDotsss);
  49. Console.WriteLine(asterisksFourString + firstInnerDotsString + asterisksFourString + secondInerDotrsssString + asterisksFourString + firstInnerDotsString + asterisksFourString);
  50.  
  51. firstInnerDots -= 2;
  52. }
  53. int posledniteeAsterisks = 1;
  54. int innerrrrrrrDots = n;
  55. int inerDotsKoitoSaEinicaaaa = 1;
  56.  
  57. string posledniteeAsterisksString = new string('*', posledniteeAsterisks);
  58. string innerrrrDotsString = new string('.', innerrrrrrrDots);
  59. string inerDotsKoitoSaEdinicaaaaString = new string('.', inerDotsKoitoSaEinicaaaa);
  60.  
  61. Console.WriteLine(posledniteeAsterisksString + inerDotsKoitoSaEdinicaaaaString + posledniteeAsterisksString + inerDotsKoitoSaEdinicaaaaString + posledniteeAsterisksString + innerrrrDotsString + posledniteeAsterisksString + inerDotsKoitoSaEdinicaaaaString + posledniteeAsterisksString + inerDotsKoitoSaEdinicaaaaString + posledniteeAsterisksString);
  62.  
  63. int finishOuterDots = n - 1;
  64. int finishAsterisks = 1;
  65. int finishInnerDots = n;
  66. for (int i = 0; i < n - 1; i++)
  67. {
  68.  
  69. }
  70. string finishOuterDotsString = new string('.', finishOuterDots);
  71. string finishAsterisksString = new string('*', finishAsterisks);
  72. string finishInnerDotsString = new string('.', finishInnerDots);
  73.  
  74. Console.WriteLine(finishOuterDotsString + finishAsterisksString + finishInnerDotsString + finishAsterisksString + finishOuterDotsString);
  75. finishInnerDots += 2;
  76. finishOuterDots--;
  77. int lastFinalAsterisks = n * 3;
  78. string lastFinalAsterisksString = new string('*', lastFinalAsterisks);
  79. Console.WriteLine(lastFinalAsterisksString);
  80.  
  81. }
  82. }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement