Mucunata101

Untitled

Mar 17th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Square_of_Stars
  4. {
  5. class Square_of_Stars
  6. {
  7. static void Main(string[] args)
  8. {
  9. var N = int.Parse(Console.ReadLine());
  10. for (int i = 1; i <= N; i++)
  11. {
  12. for (int j = 1; j <= N; j++)
  13. {
  14. if ((i != 1) && (i != N) && (j != 1) && (j != N))
  15. {
  16. Console.Write(" ");
  17. }
  18. else
  19. {
  20. Console.Write("*");
  21. }
  22. }
  23. Console.WriteLine();
  24. }
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment