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 Drawing_Axe
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var mid = 0;
- var back = (5 * n) - (3 * n)- (2*mid);
- var front = 3 * n;
- // Part 1
- for (int row = 1; row <= n ; row++)
- {
- Console.WriteLine("{0}*{1}*{2}", new string('-',front), new string('-', mid++), new string('-',back-=2 ));
- back++;
- }
- //Part 2
- for (int row2 = 1; row2 <= n/2; row2 ++)
- {
- Console.WriteLine("{0}*{1}*{2}",new string('*',front), new string('-',mid = n-1), new string('-',back=mid));
- }
- //Part 3
- for (int row3 = 1; row3 <= n/2-1; row3++)
- {
- if (n % 5 == 1)
- {
- Console.WriteLine("{0}*{1}*{2}", new string('-', front), new string('-', mid = n - 1), new string('-', back = mid));
- }
- else
- {
- Console.WriteLine("{0}*{1}*{2}", new string('-', (front)), new string('-', mid ), new string('-', back --));
- front--;
- mid +=2;
- }
- }
- //TODO LAST ROW :((
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement