Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics.CodeAnalysis;
- using System.Linq;
- using System.Numerics;
- namespace SoftuniExercisesWithVariables
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter the number of rows: ");
- int rows = int.Parse(Console.ReadLine());
- int cols = rows;
- for(int i = 1; i < rows; i++)
- {
- int num = 1;
- for(int l = 0; l <= i; l++)
- {
- Console.Write(" {0:D} ", num);
- num = num * (i - l) / (l + 1);
- }
- Console.WriteLine();
- Console.WriteLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment