AlexJC

Draw Fort

Aug 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 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 Draw_Fort
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int size = int.Parse(Console.ReadLine());
  14. int column = size / 2;
  15. string power = new string('^', column);
  16. string underscore = new string('_', ((size * 2) - (column * 2) - 4));
  17. string underscore1 = new string('_', column);
  18. string space = new string(' ', (size * 2 - 2));
  19. string space1 = new string(' ', (((size * 2 - 2) - ((size * 2) - (column * 2) - 4))) / 2);
  20. string space2 = new string(' ', ((size * 2) - 4 - (column * 2)));
  21. char character = (char)92;
  22.  
  23. Console.Write("/");
  24. Console.Write(power);
  25. Console.Write(character);
  26.  
  27. Console.Write(underscore);
  28.  
  29. Console.Write("/");
  30. Console.Write(power);
  31. Console.WriteLine(character);
  32.  
  33. for (int row = 1; row <= (size -3); row++)
  34. {
  35. Console.Write("|");
  36. Console.Write(space);
  37. Console.WriteLine("|");
  38. }
  39.  
  40. Console.Write("|");
  41. Console.Write(space1);
  42. Console.Write(underscore);
  43. Console.Write(space1);
  44. Console.WriteLine("|");
  45.  
  46. Console.Write(character);
  47. Console.Write(underscore1);
  48. Console.Write("/");
  49.  
  50. Console.Write(space2);
  51.  
  52. Console.Write(character);
  53. Console.Write(underscore1);
  54. Console.Write("/");
  55. }
  56. }
  57. }
Add Comment
Please, Sign In to add comment