Advertisement
Qrist

Empty Square with *

Apr 10th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         Console.WriteLine(new string('*',n));
  9.         for(int i=0;i<n-2;i++)
  10.         {
  11.             Console.Write("*");
  12.             Console.Write(new string(' ',n-2));
  13.             Console.WriteLine("*");
  14.         }
  15.         Console.WriteLine(new string('*', n));
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement