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