Advertisement
Qrist

Rectangle

Apr 27th, 2020
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main(string[] args)
  5.     {
  6.         int n = int.Parse(Console.ReadLine());
  7.         int[][] num = new int[n][];
  8.         for (int i = 0; i < num.Length; i++)
  9.         {
  10.             num[i] = new int[i+1];
  11.         }
  12.         for (int i = 0; i < n; i++)
  13.         {
  14.             for (int k = 0; k < num[i].Length; k++)
  15.             {
  16.                 Console.Write(num[i][k]);
  17.             }
  18.             Console.WriteLine();
  19.         }
  20.     }  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement