Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 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 kvadratna_ramka
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. #region MyRegion
  16. Console.Write("+ ");
  17. for (int i = 0; i < n-2; i++)
  18. {
  19. Console.Write("- ");
  20. }
  21. Console.WriteLine("+");
  22. #endregion
  23. #region middle
  24.  
  25.  
  26. for (int row = 0; row < n - 2; row++)
  27. {
  28. Console.Write("| ");
  29. for (int j = 0; j < n - 2; j++)
  30. {
  31. Console.Write("- ");
  32. }
  33.  
  34. Console.WriteLine("|");
  35. }
  36.  
  37.  
  38.  
  39.  
  40. #endregion
  41. #region last line
  42.  
  43. Console.Write("+ ");
  44. for (int i = 0; i < n - 2; i++)
  45. {
  46. Console.Write("- ");
  47. }
  48. Console.WriteLine("+");
  49.  
  50. #endregion
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement