Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Eggcelent
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int width = 3 * n + 1;
- int height = 2 * n;
- int start = height - n + 2;
- int end = height;
- int drawArea = height / 2;
- for (int i = 1; i <= height; i++)
- {
- for (int j = 1; j <= width; j++)
- {
- if((j >= start && j <= end && (i == 1 || i == height)) ||
- (j == start || j == end))
- Console.Write("*");
- else if ((i == drawArea && j % 2 != 0 && j != 1 && j != width) ||
- (i == drawArea + 1 && j % 2 == 0 && j != 2 && j != width - 1))
- Console.Write("@");
- else
- Console.Write(".");
- }
- Console.WriteLine();
- if (start > 2 && i < height / 2)
- {
- start -= 2;
- end += 2;
- }
- else if (i >= height - n / 2)
- {
- start += 2;
- end -= 2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement