GerganaTsirkova

Java

Nov 6th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 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 Java
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int firstSpaces = n;
  15. int seconSpaces = 2 * n;
  16. int oneSpace = 1;
  17. for (int i = 0; i < n; i++)
  18. {
  19. Console.WriteLine("{0}{1}{2}{1}{2}{1}{2}{3}",new string(' ',firstSpaces),new string('~',1),new string(' ',oneSpace),new string(' ',seconSpaces));
  20. }
  21. Console.WriteLine("{0}",new string('=',3*n+5));
  22. oneSpace = n - 1;
  23. for (int i = 1; i <= n-2; i++)
  24. {
  25. if (i == n / 2)
  26. {
  27.  
  28.  
  29. Console.Write("{0}{1}", new string('|', 1), new string('~', n));
  30. Console.Write("JAVA");
  31. Console.WriteLine("{0}{1}{2}{1}", new string('~', n), new string('|', 1), new string(' ', oneSpace));
  32.  
  33.  
  34. }
  35. else
  36. {
  37.  
  38. Console.WriteLine("{0}{1}{0}{2}{0}", new string('|', 1), new string('~', 2*n+4), new string(' ', oneSpace));
  39. }
  40. }
  41. Console.WriteLine("{0}", new string('=', 3 * n + 5));
  42. firstSpaces = 0;
  43. seconSpaces = n;
  44. int monkeyA = 2 * n + 4;
  45. for (int i = 0; i < n; i++)
  46. {
  47. Console.WriteLine("{0}{1}{2}{3}{4}",new string (' ',firstSpaces),new string('\\',1),new string('@',monkeyA),new string('/',1),new string(' ',seconSpaces));
  48. firstSpaces++;
  49. seconSpaces++;
  50. monkeyA -= 2;
  51. }
  52. seconSpaces=n;
  53.  
  54. Console.WriteLine("{0}{1}{0}",new string('=',seconSpaces),new string('=',6));
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment