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 Problem_3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string dotsMiddle = new string('.', n);
- string dots = new string('.', (n - 1) / 2);
- string and = new string('&', n - ((n - 1) / 2));
- char c = '&';
- Console.WriteLine(dots + and + dotsMiddle + and + dots);
- for (int i = 0; i < (n - 1) / 2 - 1; i++)
- {
- dots = new string('.', (n - 1) / 2 - 1 - i);
- string stars = new string('*', (n - 1) / 2 + i);
- Console.WriteLine(dots + c + stars + c + dotsMiddle + c + stars + c + dots);
- }
- Console.WriteLine(c + new string('*', n - 2) + c + new string('=', n) + c + new string('*', n - 2) + c);
- for (int i = 0; i < (n - 1) / 2 - 1; i++)
- {
- dots = new string('.', 1 + i);
- string stars = new string('*', n - 3 - i);
- Console.WriteLine(dots + c + stars + c + dotsMiddle + c + stars + c + dots);
- }
- Console.WriteLine(new string('.', (n - 1) / 2) + and + dotsMiddle + and + new string('.', (n - 1) / 2));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement