1. need help writing function

i need write a reverseInput function that will take as many numbers as
user inputs and display them back in a descending order.

for example

enter a number 6,
enter a number 12,
enter a number 4,
,,.....

out put the number in descending order is 12, 6, 4...

i can't used array.

if i can't used array how am i suppose to store the number??

3. If you're allowed to use it, use something like a std::vector which will hide the implementation details.

4. i don't think i can use a vector either. any more tips? thanks

5. i don't think i can use a vector either, any other method of doing so. i think i am suppose to create a recursive function.

6. Well that's fine. You can do this recursively. Go ahead and post what you have so far.

7. that is what i am stock on. can you help me start it off. thanks.
Code:
```int main() /// main function
{
numOrder();
}

int numOrder()
{
int inputNum;
cout<<"Enter a Number: ";
cin>>inputNum;
numOrder();
}```

8. Few points:

1. Your indentation sucks. Fixing it will improve a lot of things.
2. You're forgetting to actually print the number.
3. Very important part of recursion is to have a base case. How do you know when to quit? I would assume this is based upon the number given by the user. For example, you could return when the user enters -1.

9. 1) i try to used tab but it just doesn't work. sorry.
2) i will print the number at the end.
3) i am very confused on the recursive function, can you provide me with a example or help me started it off?

10. I spent some time talking about recursion in this topic:

11. First thing you have to decide is whether you want to output the numbers in the reverse order they were entered (easy with recursion), or in a descending sorted order.

a) Reversed
Input 4 12 6
Output 6 12 4

or

b) Descending sorted
Input 4 12 6
Output 12 6 4

The name of the function - reverseInput - suggests a), your description of the requirements suggests b).

12. i need it to be in Descending order.

13. Well then you have a number of options:

1) Read input into an array.
2) Sort array (in descending order).
3) Print array.

or

1) Read input into an array.
2) Sort array in ascending order.
3) Print array in reverse.

or

1) Read input and put it into the right position in a sorted array (insertion sort helps)
2) Print array

(I don't see where recursion would be useful, unless you plan to implement a recursive sort algorithm.)