+ 6
How the randomize() function works?? I cannot understand 😞😞😞 .
3 Respostas
+ 5
There no function called randomize() and random() in c++.
Do you mean rand()?
This article explain enough for you : http://www.cplusplus.com/reference/cstdlib/rand/
+ 3
this is how you can make rand function on your own....
WITHOUT ANY RAND FUNCTION IN ANY LANGUAGE...
## input max range
## it will print a random number from 1 to that range
*** HOPE IT WILL GET CLEAR HOW A NUMBER OR CHOICE CAN BE GENERATED RANDOMLY***
https://code.sololearn.com/cLFvBboykb8P/?ref=app
https://code.sololearn.com/cq5vk3A4FW9n/?ref=app
+ 3
Don't use rand(), it's old now. Use the <random> header.