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;
- namespace AX
- {
- class AX
- {
- static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- for (int i = 0; i < N; i++)
- Console.WriteLine(new string('-', 3 * N) + "*" + new string('-', i) + "*" + new string('-', 2 * N - 2 - i));
- for (int j = 1; j <= N / 2; j++)
- Console.WriteLine(new string('*', 3 * N + 1) + new string('-', N - 1) + "*" + new string('-', N - 1));
- if (N <= 2)
- {
- Console.WriteLine(new string('-', 3 * N) + new string('*', N + 1) + new string('-', N - 1));
- return;
- }
- else if (N > 2 && N < 4)
- {
- Console.WriteLine(new string('-', 3 * N - 1) + new string('*', 2 * N) + new string('-', N - 2));
- return;
- }
- else
- {
- for (int k = 0; k < N / 2 - 1; k++)
- {
- Console.WriteLine(new string('-', 3 * N - k) + "*" + new string('-', N - 1 + 2 * k) + "*" + new string('-', N - 1 - k));
- if (k > N / 2 -3) Console.WriteLine(new string('-', 3 * N - k - 1) + new string('*', N + 3 + 2 * k) + new string('-', N - k - 2));
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment