Question: only (for odd) Write your code in 94() that displays the triangular pattern below according to the input size and first number of each row.
Write your code in 94() that displays the triangular pattern below according to the input size and first number of each row. Both input values are single-digit positive integers, and the first number is not less than size of the pattern. You need to use nested loops in your answer. Symbol 6th digit of Student ID Odd Even Pattern ... Inverted Upright # Sample display (for odd) Size: 5 First number: 7 7*6*5*4*3* 7*6*5*4* 7*6*5* 7*6* Sample display (for even) Size: 5 First number: 7 7# 7#6# 7#6#5# 7#6#5 # 4# 7#6#5#4#3# 7* More examples Input Size: 1 First number: 1 Output (for odd) 1* Output (for even) 1# Size: 3 First number: 9 9*8*7* 9*8* 9* 9# 9#8 # 9#8 #7# Size: 4 First number: 4 4*3*2*1* 4*3*2* 4*3* 4# 4#3 # 4#3#2# 4#3#2 #1# 4* Note: There should be NO blank line in the output. You should utilize repetition structure and NOT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
