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 Axe
- {
- class Axe
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var width = 2 * n + 1;
- var points = 2;
- Console.WriteLine(new string('*', width));
- Console.WriteLine(".*{0}*.", new string(' ', width - 4));
- for (int i = 1; i <= n - 2; i++)
- {
- Console.WriteLine("{0}*{1}*{0}"
- , new string('.', points)
- , new string('@', width - 4 - 2 * i)
- );
- points += 1;
- }
- Console.WriteLine("{0}*{1}"
- , new string('.', width / 2)
- , new string('.', width / 2));
- points -= 1;
- for (int i = n - 3; i >= 0; i--)
- {
- var whiteSpaces = (width - 2 * points - 3) / 2;
- Console.WriteLine("{0}*{1}@{1}*{0}"
- , new string('.', points)
- , new string(' ', whiteSpaces)
- , ('@')
- );
- points -= 1;
- }
- Console.WriteLine("{0}*{1}*{0}"
- ,('.')
- ,new string('@', width - 4));
- Console.WriteLine(new string('*', width));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement