qua trovi un esempio della funzione srand()
http://forum.html.it/forum/showthrea...highlight=rand
p.s. ricordati di includere l'header <time.h>
poi potresti fare:
srand((unsigned)time(NULL));
i=rand()%2; // dove 0==B, 1==N
qua trovi un esempio della funzione srand()
http://forum.html.it/forum/showthrea...highlight=rand
p.s. ricordati di includere l'header <time.h>
poi potresti fare:
srand((unsigned)time(NULL));
i=rand()%2; // dove 0==B, 1==N
...Terrible warlords, good warlords, and an english song