• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
Menu
+ 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

c++srand
25th Sep 2017, 2:48 PM
Shivani Goyal
2 Réponses
+ 11
https://www.sololearn.com/discuss/600360/?ref=app https://www.sololearn.com/discuss/571632/?ref=app https://www.sololearn.com/discuss/247809/?ref=app https://www.sololearn.com/discuss/600365/?ref=app https://www.sololearn.com/discuss/591472/?ref=app
25th Sep 2017, 3:32 PM
Hatsy Rei
Hatsy Rei - avatar

Vous avez souvent des questions comme celle-ci ?

Apprenez de maniĂšre plus efficace, gratuitement :

  • Introduction Ă  Python

    7.1M apprenants

  • Introduction Ă  Java

    4.7M apprenants

  • Introduction Ă  C

    1.5M apprenants

  • Introduction Ă  HTML

    7.5M apprenants

Voir tous les cours
Aujourd'hui en vedette
How to start learning Python programming?
1 Votes
Where is the bug?
1 Votes
Is it good for student to study C++ first?
0 Votes
Active learner
0 Votes
A Little Question Here!
1 Votes
How to fix this i feel something off
0 Votes
Is code generated by chat GPT plagiarism?
0 Votes
How to add two strings together in ts or css
0 Votes
finding my compiler path
0 Votes
(Resolved) Error: Gcc undefined reference to sha 256 đŸ™„đŸ€ŠđŸœâ€â™€ïž
1 Votes