Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class SquareofStars
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string stars = new string('*', n);
- Console.WriteLine(stars);
- for (int i = 1; i <=n-2; i++)
- {
- string stars1 ="*"+new string(' ', n - 2)+"*";
- Console.WriteLine(stars1);
- }
- stars = new string('*', n);
- Console.WriteLine(stars);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement