Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. using System;
  2.  
  3. public class Startup
  4. {
  5. public static void Main()
  6. {
  7. int n = int.Parse(Console.ReadLine());
  8.  
  9. // First row
  10. Console.Write(new string('*', 2 * n));
  11. Console.Write(new string(' ', n));
  12. Console.WriteLine(new string('*', 2 * n));
  13.  
  14. // Middle part
  15. for (int row = 1; row <= n - 2; row++)
  16. {
  17.  
  18. Console.Write("*");
  19. Console.Write(new string('/', 2 * n - 2));
  20. Console.Write("*");
  21. Console.Write(new string('|', n));
  22. Console.Write('*');
  23. Console.Write(new string('/', 2 * n - 2));
  24. Console.Write("*");
  25. Console.WriteLine();
  26. }
  27.  
  28. // Last row
  29. Console.Write(new string('*', 2 * n));
  30. Console.Write(new string(' ', n));
  31. Console.WriteLine(new string('*', 2 * n));
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement