Question
Write a function drawPyramidUpsideDown to draw (print on the screen) a pyramid upside down. This function receives an integer value that determines the number of
Write a function drawPyramidUpsideDown to draw (print on the screen) a pyramid upside down. This function receives an integer value that determines the number of asterisks on the first line, then two asterisks will be removed each time where one asterisk will be printed on the last line. The function accepts both even and odd numbers. When an odd number is passed to the function no changes are needed, however, if an even number is passed to the function it is converted to an odd number by adding 1 to it. (sample print out when 4 or 5 is passed to the function) ***** *** *
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started