Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics.Tracing;
- namespace КоледнаШапка
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var h = 2 * n + 8;
- var w = 3 * n;
- Console.WriteLine("{0}x{0}",
- new string('.', (w - 1) / 2));
- Console.WriteLine("{0}/x\\{0}",
- new string('.', (w - 3) / 2));
- Console.WriteLine("{0}x|x{0}",
- new string('.', (w - 3) / 2));
- var a = 0;
- var b = 0;
- for (int i = 0; i < n ; i++)
- {
- if (i <= n / 2)
- {
- b = n + i;
- a = (w - b - b - 1) / 2;
- Console.Write("{0}{1}|{1}{0}",
- new string('.', a),
- new string('x', b));
- }
- else
- {
- b--;
- a = (w - b - b - 1) / 2;
- Console.Write("{0}{1}|{1}{0}",
- new string('.', a),
- new string('x', b));
- }
- Console.WriteLine( "" );
- }
- Console.WriteLine("{0}/x\\{0}",
- new string('.', (w - 3) / 2));
- Console.WriteLine("{0}\\x/{0}",
- new string('.', (w - 3) / 2));
- for (int i = 0; i < n; i++)
- {
- if (i <= n / 2)
- {
- b = n + i;
- a = (w - b - b - 1) / 2;
- Console.Write("{0}{1}|{1}{0}",
- new string('.', a),
- new string('x', b));
- }
- else
- {
- b--;
- a = (w - b - b - 1) / 2;
- Console.Write("{0}{1}|{1}{0}",
- new string('.', a),
- new string('x', b));
- }
- Console.WriteLine("");
- }
- Console.WriteLine("{0}x|x{0}",
- new string('.', (w - 3) / 2));
- Console.WriteLine("{0}\\x/{0}",
- new string('.', (w - 3) / 2));
- Console.WriteLine("{0}x{0}",
- new string('.', (w - 1) / 2));
- }
- }
- }
- // 5
- // .......x.......
- // ....../x\......
- // ......x|x......
- // ..xxxxx|xxxxx..
- // .xxxxxx|xxxxxx.
- // xxxxxxx|xxxxxxx
- // .xxxxxx|xxxxxx.
- // ..xxxxx|xxxxx..
- // ....../x\......
- // ......\x/......
- // ..xxxxx|xxxxx..
- // .xxxxxx|xxxxxx.
- // xxxxxxx|xxxxxxx
- // .xxxxxx|xxxxxx.
- // ..xxxxx|xxxxx..
- // ......x|x......
- // ......\x/......
- // .......x.......
Advertisement
Add Comment
Please, Sign In to add comment