Pure Programmer
Blue Matrix


Cluster Map

Project: Random Floats

Write a program to generate a random list of floating point values. The program should accept three values on the command line: minimum value, maximum value and the number of floats to generate. The maximum value need not actually occur in the list but serves as an upper limit to the values generated. The floats should be printed one per line.

Output
$ g++ -std=c++17 RandomFloats.cpp -o RandomFloats -lfmt $ ./RandomFloats 0 10 20 6.31719 2.9444 6.48337 6.00677 5.80158 7.09138 4.80171 2.33447 5.45256 1.10905 9.79092 5.92866 3.02643 5.24498 2.40634 3.34997 2.93317 7.72989 6.30132 6.21485

Solution