Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Square_of_Stars
- {
- class Square_of_Stars
- {
- static void Main(string[] args)
- {
- var N = int.Parse(Console.ReadLine());
- for (int i = 1; i <= N; i++)
- {
- for (int j = 1; j <= N; j++)
- {
- if ((i != 1) && (i != N) && (j != 1) && (j != N))
- {
- Console.Write(" ");
- }
- else
- {
- Console.Write("*");
- }
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement