Advertisement
Kuncavia

SquareOfStars

Aug 2nd, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using System;
  2.  
  3.     class SquareofStars
  4.     {
  5.         static void Main()
  6.         {
  7.             var n = int.Parse(Console.ReadLine());
  8.             Console.WriteLine(new string('*', n));
  9.             for (int i = 0; i < n - 2; i++)
  10.             {
  11.                 Console.WriteLine('*' + new string(' ', n - 2) + '*');
  12.             }
  13.             Console.WriteLine(new string('*', n));
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement