Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Arrow
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- //first line
- Console.WriteLine("{0}{1}{0}", new string('.', n / 2), new string('#', n));
- //end first line
- //second line
- for (int i = 0; i < n - 2; i++)
- {
- Console.WriteLine("{0}#{1}#{0}", new string('.', n / 2), new string('.', n - 2));
- }
- // end second line
- // third line
- Console.WriteLine("{0}{1}{0}", new string('#', n / 2 + 1), new string('.', n - 2));
- // end third line
- //fourth line
- int width = n*2-1;
- int outDotsThird = 1;
- for (int i = 0; i < n - 2; i++)
- {
- Console.WriteLine("{0}#{1}#{0}", new string('.', outDotsThird), new string('.', width-4));
- width -= 2;
- outDotsThird++;
- }
- // last line
- Console.WriteLine("{0}#{0}", new string ('.',n-1));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement