TheBulgarianWolf

Triangle of Numbers

Sep 27th, 2020
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.19 KB | None | 0 0
  1. void Main()
  2. {
  3.     int number = int.Parse(Console.ReadLine());
  4.     for(int i = 1;i<=number;i++)
  5.     {
  6.         for(int m = 1;m<=i;m++)
  7.         {
  8.             Console.Write(i + " ");
  9.         }
  10.         Console.WriteLine("");
  11.     }
  12. }
Add Comment
Please, Sign In to add comment