Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- Console.WriteLine("{0}{1}{0}", new string(' ', ((2*n)-(n+1))/2), new string ('*', (n+1)));
- for (int i = 1; i <= (n/2)+1; i++)
- {
- Console.WriteLine("{0}*{1}*{0}", new string (' ', ((2*n)-(n+1))/2), new string (' ', n-1));
- }
- int counterSpaces = ((2*n)-(n+1))/2;
- int middleSpaces = n-1;
- for (int i = 1; i <= (n/2)-1; i++)
- {
- counterSpaces -= 1;
- middleSpaces +=2;
- Console.WriteLine("{0}*{1}*{0}", new string (' ', counterSpaces), new string (' ', middleSpaces), new string(' ', counterSpaces ));
- }
- for (int i = 1; i <= n; i++)
- {
- Console.WriteLine("*{0}*", new string ('.', 2*n-2));
- }
- for (int i = 1; i <= n; i++)
- {
- Console.WriteLine("*{0}*", new string('@', 2 * n - 2));
- }
- Console.WriteLine("{0}", new string('*', n * 2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement