
R. K. Gayani D. answered 06/10/19
Tutor
New to Wyzant
Specializing in AP Computer Science and Advanced Programming
#include <time.h>
#include <stdlib.h>
srand(time(NULL)); // Initialization, should only be called once.
int r = rand(); // Returns a pseudo-random integer between 0 and RAND_MAX.