Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _08.TriangleOfNumbers
- {
- class TriangleOfNumbers
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int print = 1;
- for (int i = 1; i <= n; i++)
- {
- for (int j = 1; j <= i; j++)
- {
- Console.Write($"{i} ");
- if (j == i)
- {
- Console.WriteLine();
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment