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 Q5
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var shirina = 2 * n + 1;
- Console.WriteLine(new string('*', shirina));
- Console.WriteLine("{0}{1}{2}", magicString(".*",1), new string(' ', shirina - 4), magicString("*.",1));
- var leviTochki = 2;
- var kliomba = 2 * n - 5;
- for (int i = 0; i < n-2; i++)
- {
- Console.WriteLine("{0}*{1}*{2}", new string('.', leviTochki), new string('@', kliomba), new string('.', leviTochki));
- leviTochki++;
- kliomba-=2;
- }
- Console.WriteLine("{0}*{0}", new string('.',(shirina-1)/2));
- var leviTochki2 = (shirina - 3) / 2;
- var desniTochki2 = leviTochki2;
- var space = 0;
- for (int i = 0; i < n-2; i++)
- {
- Console.WriteLine("{0}*{1}@{1}*{0}", new string('.',leviTochki2), new string(' ', space));
- leviTochki2--;
- space++;
- }
- Console.WriteLine("."+"*" + "{0}" + "*" + ".", new string('@', shirina - 4));
- Console.WriteLine("{0}",new string('*', shirina));
- }
- public static string magicString(string text, int repeatCount)
- {
- string outputText = "";
- for (int i = 0; i < repeatCount; i++)
- {
- outputText = outputText + text;
- }
- return outputText;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement