Question: Given an int variable n , write a program that takes in n as user input. It then prints out an inverted triangle of integers,

Given an int variable n, write a program that takes in n as user input. It then prints out an inverted triangle of integers, n rows high. Each line consists of the corresponding integers, starting at 1. You must use nested for loops to solve this question.
For instance, if n is set to 4, the output of your code should be:
1223334444
In java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!