Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Sunglasses
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- char[,] sunglasses = new char[N, (N * 4) + N];
- int start = 0;
- int end = N * 2;
- int currentIndex = 0;
- for (int row = 0; row < N; row++)
- {
- for (int col = start; col < end; col++)
- {
- if (row == 0 || row == N - 1)
- {
- sunglasses[row, col] = '*';
- }
- else if (col == start || col == end - 1)
- {
- sunglasses[row, col] = '*';
- }
- else
- {
- sunglasses[row, col] = '/';
- }
- }
- }
- for (int i = end; i < end + N; i++)
- {
- sunglasses[N / 2, i] = '|';
- }
- start = end + N;
- end = start + N * 2;
- for (int row = 0; row < N; row++)
- {
- for (int col = start; col < end; col++)
- {
- if (row == 0 || row == N - 1)
- {
- sunglasses[row, col] = '*';
- }
- else if (col == start || col == end - 1)
- {
- sunglasses[row, col] = '*';
- }
- else
- {
- sunglasses[row, col] = '/';
- }
- }
- }
- for (int i = 0; i < N; i++)
- {
- for (int k = 0; k < (N * 4) + N; k++)
- {
- Console.Write(sunglasses[i,k]);
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement