Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Triangle
- {
- static void Main()
- {
- Console.Write("n = ");
- int n = Int32.Parse(Console.ReadLine());
- Console.WriteLine();
- for (int row = 1; row <= n; row++)
- {
- for (int col = 1; col <= row; col++)
- {
- Console.Write("{0} ", col);
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment