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());
- char dots = '.';
- char stars = '*';
- //1
- Console.WriteLine("{0}{1}{0}", new string(dots, n+1), new string(stars, n-1));
- //2
- for (int i = 0; i < n/2; i++)
- {
- Console.WriteLine("{0}*{1}*{0}", new string(dots, (n-1-i*2)), new string(dots, (n+1+i*4)));
- }
- //3
- for (int i = 0; i < n * 3 + 1; i++)
- {
- if (i == 1 || i == 3 * n + 1 - 2)
- {
- Console.Write('*');
- }
- else if (i == 0 || i == 3 * n + 1 - 1)
- {
- Console.Write('.');
- }
- else if (i % 2 == 1 && i != 0 && i != 3 * n + 1 - 1)
- {
- Console.Write('.');
- }
- else
- {
- Console.Write('@');
- }
- }
- Console.WriteLine();
- for (int i = 0; i < n * 3 + 1; i++)
- {
- if (i == 1 || i == 3 * n + 1 - 2)
- {
- Console.Write('*');
- }
- else if (i % 2 == 1 && i != 0 && i != 3 * n + 1 - 1)
- {
- Console.Write('@');
- }
- else
- {
- Console.Write('.');
- }
- }
- Console.WriteLine();
- //4
- for (int i = n / 2 - 1; i >= 0; i--)
- {
- Console.WriteLine("{0}*{1}*{0}", new string(dots, (n - 1 - i*2)), new string(dots, (n + 1 + i * 4)));
- }
- //5
- Console.WriteLine("{0}{1}{0}", new string(dots, n + 1), new string(stars, n - 1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement