desislava777

drow4

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