Advertisement
dragonbs

Triangle Of Numbers

Feb 2nd, 2023
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. int number = int.Parse(Console.ReadLine());
  2. for (int i = 1; i <= number; i++)
  3. {
  4.     for (int j = 1; j <= i; j++)
  5.     {
  6.         Console.Write($"{i} ");
  7.     }
  8.  
  9.     Console.WriteLine("");
  10.  
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement