NedyalkoKikov

Square

May 2nd, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 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 Square
  8. {
  9. class Sqare
  10. {
  11. static void Main()
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. Console.WriteLine(new string('*',n));
  15. for (int row = 0; row < n-2; row++)
  16. {
  17. Console.Write("*");
  18. Console.Write(new string('-',n-2));
  19. Console.WriteLine("*");
  20. }
  21. Console.WriteLine(new string('*',n));
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment