My output is 20 random 1\'s, not between 10 and 1, can anyone explain why this is happening?
#include #include #include <
What about using a condition to check if the last number is the same as the current one? If the condition is met then generate another random number. This solution works but it will take more time though.