Problem Statement
Write a program that reads an integer N and prints an inverted triangle made of numbers.
The pattern should look like this:
- The first line contains numbers from
1toN, separated by spaces. - The second line contains numbers from
1toN-1. - This continues until the last line, which contains only
1.
Use nested loops to generate the pattern.