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_2_Square_of_Stars_STRING
- {
- class Program
- {
- 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);
- }
- // in the beginning string was init -> stars = new string('*', n);
- Console.WriteLine(stars);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement