+ 4
Quiz Rejected 2
//invalid code z cannot be which of the following? int x=5; int z=random(random(random(x))); select all that apply . 15 0 3 5 can anyone explain what's wrong in it ?
3 odpowiedzi
+ 17
random() and randomise() functions are not part of the standard libraries in C++. That's probably why. Have you tried running this on a desktop compiler? The alternative that I suggest is to simply replace random() with proper usage of rand().
E.g.
int z = rand() % (rand() % (rand() % x));
P.S. The answer is 15 and 5 right?
+ 15
You got me good. =^=
+ 5
answer is 5 ,15 and 3