Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _05_Arrow
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine()); //[4...60] n + 5
- //Top part
- for (int i = 0; i < (n + 5) / 2; i++)
- {
- string lineUpBord = new string('_', (n + 5) / 2 - i);
- if (i == 0) Console.WriteLine("{0}^{0}", lineUpBord);
- else if (i == 1) Console.WriteLine("{0}/|\\{0}", lineUpBord);
- else
- {
- string dotsTopIn = new string('.', i - 2);
- Console.WriteLine("{0}/{1}|||{1}\\{0}", lineUpBord, dotsTopIn);
- }
- }
- for (int i = 2; i >= 1; i--)
- {
- string linesBord = new string('_', (n - 2 * i) / 2);
- string dotsIn = new string('.', i);
- Console.WriteLine("{0}/{1}|||{1}\\{0}", linesBord, dotsIn);
- }
- //Middle part
- string linesBordMid = new string('_', (n + 2) / 2);
- for (int i = 0; i < n + 1; i++)
- {
- if (i == n) Console.WriteLine("{0}~~~{0}", linesBordMid);
- else Console.WriteLine("{0}|||{0}", linesBordMid);
- }
- //Bottom part
- for (int i = 0; i < n / 2; i++)
- {
- string linesBottom = new string('_', (n - 2 * i) / 2);
- string dotsBottom = new string('.', i);
- Console.WriteLine("{0}//{1}!{1}\\\\{0}", linesBottom, dotsBottom);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment