C# Fundamentals - Traingle of Numbers
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp9
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
for (int row = 1; row <= n; row++)
{
for (int col = 1; col <= row - 1; col++)
{
Console.Write(row + " ");
}
Console.WriteLine(row);
}
}
}
}
Comments