How can i generate a random number? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i generate a random number?

what can I use to do so?

27th Feb 2017, 4:03 AM
Gerso Guillen
Gerso Guillen - avatar
1 Answer
+ 2
#include <iostream> #include <random> #include <time.h> using namespace std; int main() { srand(time(0)); cout << rand(); }
27th Feb 2017, 7:52 PM
SUPER_S
SUPER_S - avatar