Page 1 of 1

Displaying a Pattern of Stars and Numbers on the Console: Write a program that uses nested loops to print a pattern of s

Posted: Fri May 20, 2022 3:00 pm
by answerhappygod
Displaying A Pattern Of Stars And Numbers On The Console Write A Program That Uses Nested Loops To Print A Pattern Of S 1
Displaying A Pattern Of Stars And Numbers On The Console Write A Program That Uses Nested Loops To Print A Pattern Of S 1 (115.59 KiB) Viewed 26 times
Displaying a Pattern of Stars and Numbers on the Console: Write a program that uses nested loops to print a pattern of stars and numbers on the console. The shape and the expected console output for your program are given below. The shape consists of a triangular star pattern followed by a triangular number pattern with some space i between. You can use the given analysis below for the shape to be printed while designing and coding the nested loop structure in your program. Console Output A pattern with 5 rows (lines) 1 - row 1: 1 star followed by 8 blank spaces and the number 1 21 - row 2: 2 stars followed by 6 blank spaces and numbers from 2 to 1 321 - row 3: 3 stars followed by 4 blank spaces and numbers from 3 to 1 4321 - row 4: 4 stars followed by 2 blank spaces and numbers from 4 to 1 *****54321 row 5: 5 stars followed by 0 blank space and numbers from 5 to 1 1 ** 211 *** δΊ‹ * * 3 2 1 **** + * 4 3 2 1 * * . . * * 5 4 3 2 1