+ 1

What is the use of rand?

For which purpose it used they just mentioned that it is used for random number, i didn't get it.

1st May 2020, 1:34 AM
Majid Ali Shah
Majid Ali Shah - avatar
3 ответов
+ 4
Hello Majid Ali Shah rand() generates a pseudo random number. https://www.sololearn.com/learn/CPlusPlus/1638/?ref=app I am not sure which part of this lesson you don't understand. Just a simple example: Imagine you want to create a guess the number game. int number = 4; would be very boring. ;)
1st May 2020, 1:47 AM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Thanks...
1st May 2020, 1:54 PM
Majid Ali Shah
Majid Ali Shah - avatar