Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 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 _3.Problem_3
  8. {
  9. class Dress
  10. {
  11. static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14.  
  15. int underLine = n * 4 - 2;
  16. int stars = 2;
  17.  
  18. Console.WriteLine("{0}.{0}.{0}", new string('_', n * 4));
  19.  
  20. for (int i = 0; i < n * 2; i++)
  21. {
  22. Console.WriteLine("{0}.{1}.{0}.{1}.{0}", new string('_', underLine), new string('*', stars));
  23. stars += 3;
  24. underLine -= 2;
  25. }
  26.  
  27. for (int i = 0; i < n; i++)
  28. {
  29. Console.WriteLine(".{0}{0}.", new string('*', stars - 2));
  30. }
  31.  
  32. Console.WriteLine("{0}{1}{0}", new string('.', n * 3), new string('*', stars));
  33.  
  34. for (int i = 0; i < n; i++)
  35. {
  36. Console.WriteLine("{0}{1}{0}", new string('_', n * 3), new string('o', stars));
  37. }
  38.  
  39. underLine = n * 3;
  40. stars -= 2;
  41.  
  42. for (int i = 0; i < n * 3; i++)
  43. {
  44. Console.WriteLine("{0}.{1}.{0}", new string('_', underLine), new string('*', stars));
  45. underLine--;
  46. stars += 2;
  47. }
  48. Console.WriteLine($"{new string('.', 12 * n + 2)}");
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement