Advertisement
desislava777

drow6

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