Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- class BitsInverter
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int dots = n / 2;
- int ands = n - dots;
- int middleDots = n;
- Console.Write(new string('.',dots));
- Console.Write(new string('&', ands));
- Console.Write(new string('.', middleDots));
- Console.Write(new string('&', ands));
- Console.WriteLine(new string('.', dots));
- int length = (n / 2) - 1;
- int asteriscs = n / 2;
- dots--;
- for (int i = 0; i < length; i++,asteriscs++,dots--)
- {
- Console.Write(new string('.', dots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.Write(new string('.', middleDots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.WriteLine(new string('.', dots));
- }
- Console.Write(new string('.', dots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.Write(new string('=', middleDots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.WriteLine(new string('.', dots));
- dots++;
- asteriscs--;
- for (int i = 0; i < length; i++, asteriscs--, dots++)
- {
- Console.Write(new string('.', dots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.Write(new string('.', middleDots));
- Console.Write('&');
- Console.Write(new string('*', asteriscs));
- Console.Write('&');
- Console.WriteLine(new string('.', dots));
- }
- Console.Write(new string('.', dots));
- Console.Write(new string('&', ands));
- Console.Write(new string('.', middleDots));
- Console.Write(new string('&', ands));
- Console.WriteLine(new string('.', dots));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement