Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _05.Axe
- {
- class Axe
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int spaceBefore = 3 * n;
- int spaceIn = 0;
- int spaceAft = 0;
- int l = n / 2;
- for (int i = 0; i < n; i++)
- {
- spaceIn = i;
- spaceAft = (2 * n) - (2 + i);
- Console.WriteLine("{0}*{1}*{2}", new string('-', spaceBefore), new string('-', spaceIn), new string('-', spaceAft));
- }
- for (int i = 0; i < l; i++)
- {
- Console.WriteLine("{0}*{1}*{2}", new string('*', spaceBefore), new string('-', spaceIn), new string('-', spaceAft));
- }
- for (int i = 0; i < l; i++)
- {
- if (i != (l - 1))
- {
- Console.WriteLine("{0}*{1}*{2}", new string('-', spaceBefore), new string('-', spaceIn), new string('-', spaceAft));
- spaceBefore--;
- spaceAft--;
- spaceIn += 2;
- }
- else
- {
- Console.WriteLine("{0}*{1}*{2}", new string('-', spaceBefore), new string('*', spaceIn), new string('-', spaceAft));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement