View difference between Paste ID: 3vqQXabv and KHsHvh55
SHOW: | | - or go back to the newest paste.
1
using System;
2
3
4
class ForestRoad
5
{
6
    static void Main()
7
    {
8
        int N = int.Parse(Console.ReadLine());
9
10
        for (int i = 0, j = N-1 ; i < N; i++,j--)
11
        {
12
            Console.Write(new string('.',i));
13
            Console.Write('*');
14
            Console.Write(new string('.',j));
15
            Console.WriteLine();
16
        }
17
        for (int i = N - 1, j = 0; j < N; i--, j++)
18
        {
19
            if (j == 0)
20
            {
21
                continue;
22
            }
23
            Console.Write(new string('.', i));
24
            Console.Write('*');
25
            Console.Write(new string('.', j));
26
            Console.WriteLine();
27
        }
28
    }
29
}