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 TriangleOfDollars
- {
- class TriangleOfDollars
- {
- static void Main(string[] args)
- {
- int row;
- int col;
- int n = int.Parse(Console.ReadLine());
- for (row = 0; row <= n - 1; row++)
- {
- Console.Write("$");
- for (col = 0; col <= row - 1; col++)
- {
- Console.Write(" $");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment