Spocoman

04. Triangle of Dollars

Nov 23rd, 2021 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2.  
  3. namespace TriangleOfDollars
  4.  
  5. {
  6.     class Program
  7.     {
  8.         static void Main()
  9.         {
  10.             int n = int.Parse(Console.ReadLine());
  11.  
  12.             for (int i = 1; i <= n; i++)
  13.             {
  14.                 for (int j = 0; j < i; j++)
  15.                 {
  16.                     Console.Write($"{'$'} ");
  17.                 }
  18.                 Console.WriteLine();
  19.             }
  20.         }
  21.     }
  22. }
Add Comment
Please, Sign In to add comment