#include <iostream>
#include <random>
#include <vector>
#include <algorithm>
#include <iomanip>
int main() {
std::random_device rd;
std::mt19937 gen(rd());
// Create a uniform real distribution between -10.0 and 10.0
std::uniform_real_distribution<> dis(-10.0, 10.0);
std::vector<double> numbers;
// Generate 10 random numbers
for (int i = 0; i < 10; ++i) {
numbers.push_back(dis(gen));
}
// Sort the numbers
std::sort(numbers.begin(), numbers.end());
// Print the generated numbers
std::cout << std::fixed << std::setprecision(4);
std::cout << "Generated numbers in range [-10.0, 10.0):" << std::endl;
for (double num : numbers) {
std::cout << num << " ";
}
std::cout << std::endl;
return 0;
}