Computer Science, asked by RagaviRagavendra, 1 year ago

Difference between RANDOM and RANDOMIZE



C++..CLASS 11​

Answers

Answered by Kusumsahu7
4
<b>

Hi dear here is your answer ✔✔

In random Each time you call random(), you will get a number that is reasonably random compared to the previous call in the same program. 
But if you run the exact same program again, you will get the exact same, identical, random numbers from the execution.
And after that the outputs from random() won't be identical to those you got from the last execution run.

In randomize() does is use the time stamp to seed the random() function with a unique starting point, each time you start up the program. 
That is why you only need to call randomize() once. 

Hope its help you
Answered by Anonymous
2

Explanation:

In random Each time you call random(), you will get a number that is reasonably random compared to the previous call in the same program.

But if you run the exact same program again, you will get the exact same, identical, random numbers from the execution.

And after that the outputs from random() won't be identical to those you got from the last execution run.

Similar questions