// Add these two include directives. "csdtlib" gives you access to the mod // function % and "ctime" gives you access to the system time. We use // it to "seed" the random generator. #include #include // Issue the following command exactly once in your entire program. A // good place for it is the first line in "main." srand(time(NULL)); // In order to get a random number, call the function "rand". It // returns a random number between 0 and 32767. We then mod it with a // number n so that it gives us numbers between 0 and n (where 0 is // included but n is not. You will call this function often. rand()%10