skipter

Square of Stars

May 21st, 2017
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace ConsoleApp4
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             var n = int.Parse(Console.ReadLine());
  13.  
  14.             Console.WriteLine(new string('*', n));
  15.             for (int i = 0; i < n - 2; i++)
  16.             {
  17.                 Console.WriteLine('*' + new string(' ', n - 2) + '*');
  18.             }
  19.             Console.WriteLine(new string('*', n));
  20.  
  21.            
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment