I'm trying to get random numbers on range from 0 to 3. Using such code:
#include <cstdlib>
int index = rand() % 3;
But always getting the same results: 1 1 0 1
.
What I'm doing wrong? Always the same numbers. Results should change their values after each compilation or during runtime?