How to generate floating type random number in c++ | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 4

How to generate floating type random number in c++

18th Jun 2022, 5:57 AM
Mihir Lalwani
Mihir Lalwani - avatar
2 Réponses
+ 3
You can create a random integer and convert it to a float: https://stackoverflow.com/questions/686353/random-float-number-generation
18th Jun 2022, 7:25 AM
Alexander Thiem
Alexander Thiem - avatar
+ 5
Thank you Alexander Thiem
18th Jun 2022, 7:28 AM
Mihir Lalwani
Mihir Lalwani - avatar