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;
- namespace _3.Problem_ForestRoad
- {
- class Program
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- if (N > 1 && N < 80)
- {
- char[] dotArray = new char[N];
- for (int i = 0; i < N; i++)
- {
- dotArray[i] = '.';
- }
- for (int i = 0; i < N; i++)
- {
- dotArray[i] = '*';
- for (int j = 0; j < N; j++)
- {
- Console.Write(dotArray[j]);
- }
- dotArray[i] = '.';
- Console.WriteLine();
- }
- for (int i = N - 2; i >= 0; i--)
- {
- dotArray[i] = '*';
- for (int j = 0; j < N; j++)
- {
- Console.Write(dotArray[j]);
- }
- dotArray[i] = '.';
- Console.WriteLine();
- }
- }
- else
- {
- Console.WriteLine("Wrong entry!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement