Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class KaspichaniaBoats
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- int sizeBottom = N;
- int width = (N * 2) + 1;
- int height = 6 + ((N - 3) / 2) * 3;
- int heightSails = (2 * height) / 3;
- int heightBottom = height / 3;
- int dotOne = N - 2;
- //first part
- for (int i = 0; i < 2; i++)
- {
- Console.Write(new string('.', N - i));
- Console.Write(new string('*', width - 2 * (N - i)));
- Console.WriteLine(new string('.', N - i));
- }
- for (int i = 0; i < heightSails - 3; i++)
- {
- Console.Write(new string('.', dotOne - i));
- Console.Write('*');
- Console.Write(new string('.', i + 1));
- Console.Write('*');
- Console.Write(new string('.', i + 1));
- Console.Write('*');
- Console.Write(new string('.', dotOne - i));
- Console.WriteLine();
- }
- Console.WriteLine(new string('*', width));
- //second part
- for (int i = 0; i < heightBottom - 1; i++)
- {
- Console.Write(new string('.', i + 1));
- Console.Write('*');
- Console.Write(new string('.', dotOne - i));
- Console.Write('*');
- Console.Write(new string('.', dotOne - i));
- Console.Write('*');
- Console.Write(new string('.', i + 1));
- Console.WriteLine();
- }
- Console.Write(new string('.', (width - N) / 2));
- Console.Write(new string('*', N));
- Console.Write(new string('.', (width - N) / 2));
- Console.WriteLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement