Guest User

Untitled

a guest
Aug 9th, 2017
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2. class TriangleOfDollars
  3. {
  4.     static void Main()
  5.     {        
  6.         var n = int.Parse(Console.ReadLine());
  7.         for (int i = 0; i < n; i++)
  8.         {
  9.             Console.Write("$");
  10.             for (int d = 0; d < i; d++)
  11.             {
  12.                 Console.Write(" $");
  13.             }
  14.             Console.WriteLine();
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment