/**************************************************************** **** **** This file belongs with the course **** Introduction to Scientific Programming in C++/Fortran2003 **** copyright 2017-2023 Victor Eijkhout eijkhout@tacc.utexas.edu **** **** intrange: problems with the C random number generator **** **** THIS DOES NOT DEMONSTRATE ANYTHING **** ****************************************************************/ #include using std::cin; using std::cout; #include using std::vector; int main() { int period{0}; int init = rand(); for (;;) { int other = rand(); ++period; if (other==init) break; } cout << "Period: " << period << '\n'; vector count(6); for (int i=0; i