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 squareOfStars
- {
- class squareOfStars
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i <(n); i++)
- {
- string stars = new string('*', n);
- Console.WriteLine(stars);
- for (int j = 0; j < n-2; j++)
- {
- stars = '*' + new string(' ', (n-2)) + '*';
- Console.WriteLine(stars);
- }
- stars = new string('*', n);
- Console.WriteLine(stars);
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement