Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class RockLq
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int width = 3 * n;
- int height = 2 * n;
- Console.WriteLine("{0}{1}{0}",
- new string('.', n),
- new string('*', n),
- new string('.', n));
- int secondPart = (n-1) / 2;
- int secondPart2 = n - 2;
- int secondPart3 = n + 2;
- for (int i = 0; i <= secondPart - 1; i++)
- {
- Console.WriteLine("{0}*{1}*{0}",
- new string('.', secondPart2),
- new string('.', secondPart3),
- new string ('.', secondPart2));
- secondPart2-=2;
- secondPart3 += 4;
- }
- int thirdPart = n - 2;
- int thirdPart2 = n;
- Console.WriteLine("*{0}*{1}*{0}*",
- new string('.', thirdPart),
- new string('.', thirdPart2),
- new string('.', thirdPart));
- int fourthPart = (n - 3) / 2; // много важен ред..РЕШАВАЩ
- int fourthPart2 = n - 4;
- int fourthPart3 = n - (n - 1);
- int fourthPart4 = n;
- for (int i = 0; i < fourthPart ; i++)
- {
- Console.WriteLine("*{0}*{1}*{2}*{1}*{0}*",
- new string('.', fourthPart2),
- new string('.', fourthPart3),
- new string('.', fourthPart4),
- new string('.', fourthPart3),
- new string('.', fourthPart2));
- fourthPart2 -= 2;
- fourthPart3 += 2;
- }
- int fifthPart = n - 1;
- int fifthPart2 = n;
- Console.WriteLine("{0}*{1}*{0}",
- new string('.', fifthPart),
- new string('.', fifthPart2),
- new string('.', fifthPart));
- int sixthPart = n - 2;
- int sixthPart2 = n - 2;
- int sixthPart3 = n + 2;
- for (int i = 0; i < sixthPart; i++)
- {
- Console.WriteLine("{0}*{1}*{0}",
- new string('.', sixthPart2),
- new string('.', sixthPart3),
- new string('.', sixthPart2));
- sixthPart2 -= 1;
- sixthPart3 += 2;
- }
- int lastPart = n * 3;
- Console.WriteLine("{0}",
- new string ('*', lastPart));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement