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 Program
- {
- static void Main(string[] args)
- {
- int N = int.Parse(Console.ReadLine());
- //int width = 5 * N;
- int Leading_ = 3 * N;
- int rows_before_handle = N / 1;
- int rows_for_handle = N / 2;
- int rows_after_handle = N / 2;
- char myString = '-';
- // till handle cycle ....................................
- for (int i = 0; i < rows_before_handle; i++)
- {
- Console.WriteLine(new string('-', Leading_) + "*" +
- new string('-', i) + "*" +
- new string('-', N*5-Leading_-2-i)
- );
- }
- // handle cycle .........................................
- for (int i = 0; i < rows_for_handle; i++)
- {
- Console.WriteLine(new string('*', Leading_) + "*" +
- new string('-', N-1) + "*" +
- new string('-', N - 1));
- }
- // after handle cycle ...................................
- for (int i = 0; i < rows_after_handle; i++)
- {
- if (i == rows_after_handle - 1)
- myString = '*'; // for last row of shape
- else
- myString = '-';
- Console.WriteLine(new string('-', Leading_-i) + "*" +
- new string(myString, N-1+i*2) + "*" +
- new string('-', N-1-i)
- );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement