// // Example 6.11. Program to print random numbers in the range // 0 - RAND_MAX with seed based on time // #include #include #include #include using namespace std; int main() { int i = 0; srand( static_cast(time(static_cast(NULL))) ); cout << "Random integers between 0 and " << RAND_MAX << ":" << endl; while (i < 10) { cout << setw(6) << rand(); ++i; } return 0; }