desislava777

bradva

Nov 7th, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 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 ConsoleApplication7
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var n = int.Parse(Console.ReadLine());
  14. for (int row = 0; row < n; row++)
  15. {
  16. Console.Write(new string('-', 3 * n));
  17. Console.Write("*");
  18. Console.Write(new string('-', row));
  19. Console.Write("*");
  20. Console.WriteLine(new string('-', 2 * n - 2 - row));
  21. }
  22. for (int row = 0; row < n / 2; row++)
  23. {
  24. Console.Write(new string('*', 3 * n));
  25. Console.Write("*");
  26. Console.Write(new string('-', n - 1));
  27. Console.Write("*");
  28. Console.WriteLine(new string('-', n - 1));
  29. }
  30. for (int row = 0; row < n / 2; row++)
  31. {
  32. Console.Write(new string('-', 3 * n - row));
  33. Console.Write("*");
  34. if (row == n / 2 - 1)
  35. Console.Write(new string('*', n - 1 + (2 * row)));
  36. else
  37. Console.Write(new string('-', n - 1 + (2 * row)));
  38. Console.Write("*");
  39. Console.WriteLine(new string('-', n - row - 1));
  40. }
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment