Hot answers tagged


you have a small typo error in the function you have written: int get_positive_int versus: int get_positive_int_


Don't stress yourself out too much with trying to understand everything, even after reading up on it--sometimes things only "click" after your brain stops thinking about it. Let's take a look at your loops and see if we can't get them to make a little better sense. Instead of looking at all of the code, let's simplify the code down first. Take the ...


In the for loop use, (i = n, i >= 0, i--). This will start from n and go to zero so the output is in descending order. Hope this helps. If it does, please check the tickmark.

Only top voted, non community-wiki answers of a minimum length are eligible