Question: Write a Java code Printing a Parallelogram Shaped Number and Star Pattern on the Console: Write a program that prints a parallelogram shaped number and

Write a Java code
Printing a Parallelogram Shaped Number and Star Pattern on the Console:
Write a program that prints a parallelogram shaped number and star pattern on the console by using nested
loops. The shape and the expected console output for your program are given below.
The parallelogram shape consists of an inverse triangle star pattern followed by a triangle number
pattern.
You can use the given analysis below for the shape to be printed while you are designing and coding
the nested loop structure in your program.
As shown in the shape below,
(1) the final blank spaces at the end of each row are not important, but the initial blank spaces are
(2) and the shape has three different parts that are visualized using three different colors.
A number and star pattern with 5 rows
row 1: 9 stars followed by number 1
row 2: 7 stars followed by numbers from 1 to 2 then number 1
row 3: 5 stars followed by numbers from 1 to 3 then numbers from 2 to 1
row 4: 3 stars followed by numbers from 1 to 4 then numbers from 3 to 1
row 5: 1 star followed by numbers from 1 to 5 then numbers from 4 to 1
Note: There are also some blank space(s) at the beginning of the rows.
DO NOT FORGET TO UPLOAD YOUR JAVA CODE FILE (.java FILE) TO BLACKBOARD
Write a Java code Printing a Parallelogram Shaped

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