generate random double c++
#include <iostream>
#include <cstdlib>
#include <ctime>
int main() {
// Seed the random number generator
std::srand(static_cast<unsigned int>(std::time(nullptr)));
// Generate a random double between 0.0 and 1.0
double randomDouble = static_cast<double>(std::rand()) / RAND_MAX;
// Print the generated random double
std::cout << "Random Double: " << randomDouble << std::endl;
return 0;
}