What is randomised function in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

What is randomised function in c++

Randomised function in c++

17th Jul 2021, 2:02 AM
Rakshit Pahel
Rakshit Pahel - avatar
1 Answer
+ 2
randomize function is used to generate random numbers each time, when you run program. alternatively, you can use the seeding with time to generate random numbers. eg-: srand(time(0)) you need to include cstdlib and ctime.
17th Jul 2021, 2:10 AM
Rellot's screwdriver
Rellot's screwdriver - avatar