Advertisement
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 ConsoleApp10
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string dot = new string('.', ((3 * n) - 1) / 2);
- string dot1 = new string('.', ((3 * n) - 3) / 2);
- int x = n;
- int y = n;
- Console.Write("{0}x{1}", dot, dot);
- Console.WriteLine();
- Console.Write("{0}/x\\{1}", dot1, dot1);
- Console.WriteLine();
- Console.Write("{0}x|x{1}", dot1, dot1);
- Console.WriteLine();
- for (int i = 0; i <n / 2; i++)
- {
- Console.WriteLine("{0}{1}|{1}{0}",
- new string('.', ((3 * n) - (x * 2 + 1)) / 2 ),
- new string('x', x));
- x += 1;
- }
- for (int i = n / 2; i >= 0; i--)
- {
- Console.WriteLine("{0}{1}|{1}{0}",
- new string('.', ((3 * n) - (x * 2 + 1)) / 2),
- new string('x', x));
- x -= 1;
- }
- Console.Write("{0}/x\\{1}", dot1, dot1);
- Console.WriteLine();
- Console.Write("{0}\\x/{1}", dot1, dot1);
- Console.WriteLine();
- for (int i = 0; i < n / 2; i++)
- {
- Console.WriteLine("{0}{1}|{1}{0}",
- new string('.', ((3 * n) - (y * 2 + 1)) / 2),
- new string('x', y));
- y += 1;
- }
- for (int i = n / 2; i >= 0; i--)
- {
- Console.WriteLine("{0}{1}|{1}{0}",
- new string('.', ((3 * n) - (y * 2 + 1)) / 2),
- new string('x', y));
- y -= 1;
- }
- Console.Write("{0}x|x{1}", dot1, dot1);
- Console.WriteLine();
- Console.Write("{0}\\x/{1}", dot1, dot1);
- Console.WriteLine();
- Console.Write("{0}x{1}", dot, dot);
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement