Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 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 ConsoleApp3
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. int width = 3 * n;
  16.  
  17.  
  18.  
  19. string dots = new string('.', (width - 3) / 2);
  20. string dotsTwo = new string('.', (width -3)/2);
  21. Console.WriteLine($"{dots}.x.{dots}");
  22. Console.WriteLine($"{dotsTwo}/x\\{dotsTwo}");
  23. Console.WriteLine($"{dotsTwo}x|x{dotsTwo}");
  24.  
  25. for (int i = 0; i < (n + 1) / 2; i++)
  26. {
  27. string cross = new string('x', n + i);
  28. string Moredots = new string('.', ((width - 1) / 2) - n - i);
  29. Console.WriteLine($"{Moredots}{cross}|{cross}{Moredots}");
  30. }
  31.  
  32. for (int i = 1; i <= (n - 1) / 2; i++)
  33. {
  34. string Moredots = new string('.', i);
  35. string cross = new string('x', width / 2 - i);
  36. Console.WriteLine($"{Moredots}{cross}|{cross}{Moredots}");
  37. }
  38.  
  39. Console.WriteLine($"{dots}/x\\{dots}");
  40. Console.WriteLine($"{dots}\\x/{dots}");
  41.  
  42.  
  43. for (int i = 0; i < (n + 1) / 2; i++)
  44. {
  45. string cross = new string('x', n + i);
  46. string Moredots = new string('.', ((width-1) / 2) - n - i);
  47. Console.WriteLine($"{Moredots}{cross}|{cross}{Moredots}");
  48. }
  49.  
  50. for (int i = 1; i <= (n - 1) / 2; i++)
  51. {
  52. string Moredots = new string('.', i);
  53. string cross = new string('x', width / 2 -i);
  54. Console.WriteLine($"{Moredots}{cross}|{cross}{Moredots}");
  55. }
  56.  
  57. Console.WriteLine($"{dotsTwo}x|x{dotsTwo}");
  58. Console.WriteLine($"{dotsTwo}\\x/{dotsTwo}");
  59. Console.WriteLine($"{dots}.x.{dots}");
  60. }
  61. }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement