/* random_numbers.c Jeff Ondich, 29 May 2019 Using the built-in pseudo-random number generator in C. 1. Read, compile, and run 2. What happens if you comment out the "srand" line, recompile, and then run the program a few times? 3. How would you generate random numbers between 95 and 112, inclusive? 4. Check out the manual pages for srand and rand ("man srand" and "man rand" at a Unix prompt) */ #include #include #include int main() { srand(time(0)); // Generate 20 random numbers between 0 and 10, inclusive. for (int k = 0; k < 20; k++) { int randomNumber = rand() % 11; printf("%d\n", randomNumber); } return 0; }