Код: Выделить всё
#include
#include
srand(time(0));
int randomval = rand() % 2;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/8422709/why-do-i-get-the-same-result-from-rand-when-in-run-it-in-a-loop-and-srandtime0[/url]
Код: Выделить всё
#include
#include
srand(time(0));
int randomval = rand() % 2;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/8422709/why-do-i-get-the-same-result-from-rand-when-in-run-it-in-a-loop-and-srandtime0[/url]