Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class ExcelColumns
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- int firstRight = N / 2 + 1;
- int firstLeft = N / 2 + 1;
- int secondRight = N + N + N / 2 + N / 2 - 1 - N / 2;
- int secondLeft = N + N + N / 2 + N / 2 - 1 - N / 2;
- //FIRST PART
- for (int f = 1; f <= N + N + N - 2; f++)
- {
- for (int i = 1; i <= (N + N + N / 2 + N / 2 - 1); i++)
- {
- if (i == firstLeft || i == firstRight || i == secondLeft || i == secondRight)
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(".");
- }
- }
- //RIGHT PART
- /*for (int i = 1; i <= (N / 2 + N) - 1; i++)
- {
- if (i == secondLeft || i == secondRight)
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(".");
- }
- }*/
- if (f < N + N - 1)
- {
- firstLeft--;
- firstRight++;
- secondLeft--;
- secondRight++;
- Console.WriteLine();
- }
- if (f >= N + N - 1)
- {
- firstRight--;
- secondLeft++;
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement