You have to use a collection (like the array), at least to store the numbers.
That said, using a
std::multiset
could be an advantageous, try:
#include <iostream>
#include <set>
using namespace std;
int main()
{
multiset<int, greater<int> > ms{1, 12, -3, 27, 2, 12, 42, 1, 53};
for (auto i : ms)
cout << i << " ";
cout << endl;
}