Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Купа
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- for (int r = 0; r <= n; r++)
- {
- for (int col = n - r; col < n * 2; col++)
- {
- Console.Write(".");
- }
- Console.Write("#");
- ////
- for (int col = n + r ; col < n * 2 ; col++)
- {
- if (r < n / 2)
- {
- Console.Write("#");
- }
- else
- {
- Console.Write(".");
- }
- }
- for (int col = n; col < n * 2 - 2; col++)
- {
- if (r < n / 2)
- {
- Console.Write("#");
- }
- else
- if (r < n / 2)
- {
- Console.Write("#");
- }
- else
- {
- Console.Write(".");
- }
- }
- for (int col = n + r; col < n * 2; col++)
- {
- if (r < n / 2)
- {
- Console.Write("#");
- }
- else
- {
- Console.Write(".");
- }
- }
- ////
- Console.Write("#");
- for (int col = n - r; col < n * 2; col++)
- {
- Console.Write(".");
- }
- Console.WriteLine();
- }
- ///
- int widht = n / 2 * 10;
- int hashCount = n;
- string hash = new string('#', hashCount);
- int dotMidCount = (widht - hashCount) / 2 ;
- string dotMid = new string('.', dotMidCount);
- Console.WriteLine($"{dotMid}{hash}{dotMid}");
- ////
- for (int rol = 1; rol <= n + 2; rol++)
- {
- int hashDownCount = n + 4;
- string hashDown = new string('#', hashDownCount);
- int dotdownCount = (widht - hashDownCount) / 2;
- string dotDown = new string('.', dotdownCount);
- int dotDownMidleCount = (hashDownCount - 10) / 2; // D^A^N^C^E^
- string dotDownMidle = new string('.', dotDownMidleCount);
- int midRow = (n + 2) / 2;
- if (rol == midRow)
- {
- Console.WriteLine($"{dotDown}{dotDownMidle}D^A^N^C^E^{dotDownMidle}{dotDown}");
- }
- else
- {
- Console.WriteLine($"{dotDown}{hashDown}{dotDown}");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment