Question: Use nested for loops to solve this program. 3. Ask the user for a number of rows and then use a while loop to validate

Use nested for loops to solve this program. 3. Ask the user for a number of rows and then use a while loop to validate to make sure the number of rows is greater than or equal to 2. 4. Print dollar signs in the shape of a tree (more like a Christmas tree) with the number of rows being equal to the number the user entered in. Refer to sample output for an example. HINT: You will have three for-loops in total to accomplish this. One outer for loop and two which are inside of the outer one.

sample output

Enter number of rows: -4 Oops! You must enter a number greater then 1! Enter number of rows: 1 Oops! You must enter a number greater then 1! Enter number of rows: 15 $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $

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!