Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _08.SquarePrint
- {
- class SquarePrint
- {
- static void Main()
- {
- int numOfRaws = int.Parse(Console.ReadLine());
- for (int a = 1; a <= numOfRaws; a++)
- Console.Write("*");
- Console.WriteLine();
- for (int row = 1; row <= numOfRaws - 2; row++)
- {
- Console.Write("*");
- for (int b = 1; b <= numOfRaws - 2; b++)
- Console.Write(" ");
- Console.Write("*");
- Console.WriteLine();
- }
- for (int a = 1; a <= numOfRaws; a++)
- Console.Write("*");
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement