Advertisement
Guest User

06.SnowFlake

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 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 _05.Snowflake
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int num = int.Parse(Console.ReadLine());
  14. for (int i = 0; i < num - 1; i++)
  15. {
  16. Console.WriteLine(new string('.', i) +
  17. "*" + new string('.', num - i) +
  18. "*" + new string('.', num - i) +
  19. "*" + new string('.', i));
  20. }
  21.  
  22. Console.WriteLine(new string('.', num - 1) +
  23. new string('*', (2 * num + 3) - (2 * (num - 1))) +
  24. new string('.', num - 1));
  25. Console.WriteLine(new string('*', 2 * num + 3));
  26. Console.WriteLine(new string('.', num - 1) +
  27. new string('*', (2 * num + 3) - (2 * (num - 1))) +
  28. new string('.', num - 1));
  29. for (int i = num - 2; i >= 0; i--)
  30. {
  31. Console.WriteLine(new string('.', i) +
  32. "*" + new string('.', num - i) +
  33. "*" + new string('.', num - i) +
  34. "*" + new string('.', i));
  35. }
  36. }
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement