Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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.  
  7. namespace ConsoleApplication3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. for (int i = 0; i < n; i++)
  15. {
  16. if (i == 0 || i == n - 1)
  17. {
  18. Console.WriteLine(new string('*', n));
  19. }
  20. else
  21. {
  22. Console.WriteLine("*" + new string(' ', n-2) + "*");
  23. }
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement