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 _05_08_1_Square_of_Stars
- {
- class Program
- {
- static void Main(string[] args)
- {
- var N = int.Parse(Console.ReadLine());
- if (N >= 2 && N <= 100)
- {
- for (int i = 1; i <= N; i++)
- {
- Console.Write("*");
- for (int j = 2; j <= (N - 1); j++)
- {
- if (i == 1 || i == N)
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(" ");
- }
- }
- Console.WriteLine("*");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement