I have a project with five clients that must to generate casual numbers between 0 and 19 and then send them to server.
Problem is that in every execution the mains generates same values:
Example:
Main 0 : 2 0 3 15 9....
Main 1 : 2 0 3 15 9....
Main 2 : 2 0 3 15 9....
and so on, i want different numbers by each execution.
Under i report my code used to generate casual numbers, which would be the problem?
Thanks to all.
1 2 3 4
#include<time.h>
srand((unsigned)time(NULL));
int choice = rand()%20;