fork download
  1. using System;
  2.  
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7. Console.Write("Enter a number of rows: ");
  8. int rows = Convert.ToInt32(Console.ReadLine());
  9. //Accepting inner loop and outer loop
  10. for (int i = 1; i <= rows; i++)
  11. {
  12. for (int j = 1; j <= i; j++) {
  13. Console.Write('$');
  14. }
  15. Console.WriteLine();
  16. }
  17. Console.ReadLine();
  18. }
  19. }
  20.  
  21.  
  22.  
Success #stdin #stdout 0.02s 15916KB
stdin
Standard input is empty
stdout
Enter a number of rows: