Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TriangleDollars
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 1; i <= n; i++)
- {
- for (int j = 0; j < i; j++)
- {
- Console.Write("$ ");
- }
- Console.WriteLine();
- }
- }
- }
- }
- /* var n = int.Parse(Console.ReadLine());
- for (var row = 1; row <= n; row++)
- {
- Console.Write("$");
- for (var col = 1; col < row; col++)
- Console.Write(" $");
- Console.WriteLine();
- }
- }
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment