How do i create a random number generator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do i create a random number generator

I'm just a beginner, please show me the program of it, so i can understand. https://www.sololearn.com/discuss/2030471/?ref=app

9th Jan 2020, 6:58 AM
SR33N3SH
SR33N3SH - avatar
2 Answers
+ 1
Try using rand() function Learn more about it here 👇 https://www.google.com/amp/s/www.geeksforgeeks.org/rand-and-srand-in-ccpp/amp/
9th Jan 2020, 7:14 AM
Arsenic
Arsenic - avatar
+ 1
Simply use rand() Suppose you want random numbers and all should be less than 100 then take Int i=rand()%101
9th Jan 2020, 10:13 AM
Shubham Vilayatkar
Shubham Vilayatkar - avatar