desislava777

drow5

Nov 15th, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 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 ConsoleApplication45
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. Console.Write("+");
  15. for (int i = 0; i < n - 2; i++)
  16. Console.Write(" -");
  17. Console.WriteLine(" +");
  18. for(int i=0; i<=n-3; i++) {
  19. Console.Write("|");
  20. for (int row=0; row < n - 2; row++)
  21. Console.Write(" -");
  22. Console.WriteLine(" |");
  23. }
  24. Console.Write("+");
  25. for (int i = 0; i < n - 2; i++)
  26. Console.Write(" -");
  27. Console.WriteLine(" +");
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment