Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. class NewHouse
  4. {
  5. static void Main()
  6. {
  7. var n = int.Parse(Console.ReadLine());
  8. var roof = (n / 2) + 1;
  9. var star = '*';
  10.  
  11. for (int i = 1; i <= n ; i+=2)
  12. {
  13. Console.WriteLine("{0}{1}{0}",
  14. new string('-', (n - i) / 2),
  15. new string(star,i)
  16. );
  17. }
  18.  
  19. for (int i = 1; i <= n; i++)
  20. {
  21. Console.WriteLine("{0}{1}{0}",
  22. new string('|', 1),
  23. new string(star, (n - 2))
  24. );
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement