The numbers outputted by the program are exactly the same, that doesn't seem like random 🤔 | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

The numbers outputted by the program are exactly the same, that doesn't seem like random 🤔

25th May 2018, 6:13 AM
Johnson Devasia
Johnson Devasia - avatar
3 Réponses
+ 2
random in c++ isn't going to be random if your seed is not random,thats why your seed should be based on time ....srand(time(0)) https://www.sololearn.com/learn/CPlusPlus/1638/
25th May 2018, 6:59 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 1
which program?
25th May 2018, 6:24 AM
Sunil Thakali
Sunil Thakali - avatar
0
It was regarding rand() function anyways, figured it out.. thanks for responding 😊
25th May 2018, 6:37 AM
Johnson Devasia
Johnson Devasia - avatar