123456
#include <ctime> #include <cstdlib> //... srand(time(0)); //Seed the PRNG. rand(); //Generate a random int. //...