My output is 20 random 1\'s, not between 10 and 1, can anyone explain why this is happening?
#include #include #include <
Probably "10 * rand()" is smaller than "RAND_MAX + 1.0", so the value of your calculation is 0.