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;
- using System.Globalization;
- namespace zadacha5
- {
- class Program
- {
- static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- var width = (2 * N) + 2;
- // cycle 1
- int spacesTimesOut = (width - 6) / 2;
- int spacesTimesIn = 0;
- for (int c1 = 1; c1 <= N - 1; c1++)
- {
- string total = new string(' ', spacesTimesOut) + "/"
- + new string(' ', spacesTimesIn)
- + "| |" + new string(' ', spacesTimesIn)
- + "\\";
- spacesTimesIn++;
- spacesTimesOut--;
- Console.WriteLine(total);
- }
- // hard code
- spacesTimesOut = ((width - 4) - (N + 1)) / 2;
- Console.WriteLine(new string('-', width));
- //Console.WriteLine("|" + new string(' ', width -2)+"|");
- Console.WriteLine("|" + new string(' ', spacesTimesOut) + "_" + new string(' ', N + 1) + "_" + new string(' ', spacesTimesOut) + "|");
- Console.WriteLine("|" + new string(' ', spacesTimesOut) + "@" + new string(' ', N + 1) + "@" + new string(' ', spacesTimesOut) + "|");
- // cycle 2
- for (int c2 = 1; c2 <= N / 2; c2++)
- {
- Console.WriteLine("|" + new string(' ', width - 2) + "|");
- }
- // hard code
- spacesTimesOut = (width - 4) / 2;
- Console.WriteLine("|" + new string(' ', spacesTimesOut) + "OO" + new string(' ', spacesTimesOut) + "|");
- spacesTimesOut -= 1;
- Console.WriteLine("|" + new string(' ', spacesTimesOut) + "/ \\" + new string(' ', spacesTimesOut) + "|");
- Console.WriteLine("|" + new string(' ', spacesTimesOut) + "||||" + new string(' ', spacesTimesOut) + "|");
- // cycle 3
- int dashBTimes = 1;
- int dashFTimes = 1;
- int tileTimes = width - 2;
- for (int c3 = 1; c3 <= N; c3++)
- {
- string total = new string('\\', dashBTimes) + new string('`', tileTimes) + new string('/', dashFTimes);
- Console.WriteLine(total);
- dashBTimes++;
- dashFTimes++;
- tileTimes-= 2;
- }
- // hard code
- Console.WriteLine(new string('\\', width/2) + new string('/', width / 2));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement