Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace NumbersTriangle
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 1; i <= n; i++)
- {
- for (int j = 1; j <= i; j++)
- {
- Console.Write(j);
- }
- Console.WriteLine();
- }
- for (int i = 1; i < n; i++)
- {
- for (int j = n-i; j >= 1; j--)
- {
- List<int> arr = new List<int>();
- arr.Add(j);
- for (int u = arr.Count; u > 0; u--)
- {
- Console.Write(u);
- }
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement