Guest User

fort

a guest
Jul 6th, 2016
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 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 HelloCSharp
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int n = int.Parse(Console.ReadLine());
  15. int k = 0;
  16. if (n%2!=0)
  17. {
  18. k = 1;
  19. }
  20. //Upper part
  21. Console.WriteLine("/"+new string('^',n/2)+"\\"+ new string('_', 2*n-n-4+k) + "/" + new string('^', n / 2) + "\\");
  22. //Middle part
  23. for (int i = 0; i < n-2; i++)
  24. {
  25. if (i!=n-3)
  26. {
  27. Console.WriteLine("|" + new string(' ', 2 * n - 2) + "|");
  28. }
  29. else
  30. {
  31. Console.WriteLine("|" + new string(' ', n/2+1) + new string('_', 2 * n - n - 4+k) + new string(' ', n / 2 + 1) + "|");
  32. }
  33.  
  34. }
  35. //Lower part
  36. Console.WriteLine("\\" + new string('_', n / 2) + "/" + new string(' ', 2 * n - n - 4+k) + "\\" + new string('_', n / 2) + "/");
  37.  
  38. }
  39. }
  40. }
Add Comment
Please, Sign In to add comment