How to generate floating type random number in c++ | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 4

How to generate floating type random number in c++

18th Jun 2022, 5:57 AM
Mihir Lalwani
Mihir Lalwani - avatar
2 Respuestas
+ 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