Advertisement
Qrist

Triangle of Numbers

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