hello!
i'd like to know if there's a way to choose one between two numbers.
e.x. i have 0 and 1 and each time i want one of those two to be selected.does rand() help?
thank you
hello!
i'd like to know if there's a way to choose one between two numbers.
e.x. i have 0 and 1 and each time i want one of those two to be selected.does rand() help?
thank you
Try
and remember to includeCode:int r = rand() > RAND_MAX/2;
early in the main function.Code:srand(time(0));
thanks a lot!worked just fine