Write a program called Sequence to produce a sequence of odd numbers counting down from a number
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a program called Sequence to produce a sequence of odd numbers counting down from a number entered by the user and finishing at 1.
REQUIREMENTS
- The user input is always correct (input verification is not required).
- Your code must use recursion.
- Your code must work exactly like the following example (the text in bold indicates the user input). Example of the program output(the text in bold indicates the user input):
Example 1: Please input a positive odd number: 5
Your sequence is: 5 3 1
Example 2:
Please input a positive odd number: 11
Your sequence is: 11 9 7 5 3 1
Posted Date: