C# program to print below number triangle by entering no of lines
Here's a C# program that will print the number triangle you described, based on the number of lines entered by the user:
Below is the output of the above program:
In this program, the PrintNumberTriangle method takes the number of lines as a parameter and uses nested loops to iterate through the lines and print the appropriate numbers. The first loop is responsible for printing the lines, and within each line, it prints the numbers in ascending order followed by the numbers in descending order.
When you run the program, it will ask you to enter the number of lines, and then it will print the number triangle accordingly.