C++
#include
#include
#include
#include
#include
std::mt19937 gen {std::random_device()()};
std::uniform_int_distribution uid(1, 10);
int main()
{
int N = 0;
std::cin >> N;
std::vector arr(N);
for (auto &i : arr) i = uid(gen);
std::reverse(std::begin(arr), std::end(arr));
std::copy(std::begin(arr), std::end(arr),
std::ostream_iterator(std::cout, " "));
system("pause");
}