Question: Write a program to get a user s integer input for the number of lines ( ranging from 2 to 9 ) , and then

Write a program to get a users integer input for the number of lines (ranging from 2 to 9), and then print a triangular pattern of numbers by a nested for loop. For example, if the users input is 5, the pattern should look like:
1
12
123
1234
12345
If the users input is 8, the pattern should look like:
1
12
123
1234
12345
123456
1234567
12345678

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem you need to create a program that will prompt the user for an integer input ra... View full answer

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 Databases Questions!