nvnnaidenov

SquareOfStars - Chapter 1.0

Feb 9th, 2022
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. //Task 006, Chapter 1.0
  2. using System;
  3.  
  4. public class SquareOfStars
  5. {
  6.     static void Main()
  7.     {
  8.         int n = int.Parse(Console.ReadLine());
  9.  
  10.         Console.WriteLine(new string('*', n));
  11.  
  12.         for(int i = 1; i <= n - 2; i++)
  13.         {
  14.             Console.WriteLine("*" + new string(' ', n - 2) + "*");
  15.         }
  16.  
  17.         Console.WriteLine(new string('*', n));
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment