niksan878

Untitled

Apr 14th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. class Program
  7. {
  8. static void Main()
  9. {
  10. int n = int.Parse(Console.ReadLine());
  11. int innerDots = 0;
  12. int middleDots = n-2;
  13. int lines = 1;
  14. while (middleDots>=0)
  15. {
  16. Console.WriteLine("{0}{1}{2}{3}{0}", new string('.', innerDots), "\\",new string('*', middleDots), "/");
  17. middleDots -= 2;
  18. innerDots++;
  19. lines++;
  20. }
  21. int count = 0;
  22.  
  23. if (n>=12)
  24. {
  25. while (count < (n/2-2))
  26. {
  27. Console.WriteLine("{0}{1}{0}", new string('.', innerDots - 1), "||");
  28. count++;
  29. lines++;
  30. }
  31. }
  32. else
  33. {
  34. while (count < (n / 2 - 1))
  35. {
  36. Console.WriteLine("{0}{1}{0}", new string('.', innerDots - 1), "||");
  37. count++;
  38. lines++;
  39. }
  40. }
  41.  
  42.  
  43. while (lines <= n)
  44. {
  45. Console.WriteLine("{0}", new string ('-',n));
  46. lines++;
  47. }
  48.  
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment