what is srand()?pls explain it and it's functionality. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

what is srand()?pls explain it and it's functionality.

int main () { srand(98); for (int x = 1; x <= 10; x++) { cout << 1 + (rand() % 6) << endl; } } pls also explain this program's functionality

25th Sep 2017, 2:48 PM
Shivani Goyal
1 Antwort