I have an assignment that I must generate 5000 numbers within the range of 1-20. But it states I should use rand() and not srand()..
If I do this I need an if statement to specify that if the number is between 1-20 that it should be written to a file. Doing is to generate 5000 numbers would take very long. Any takes on how to do this faster and memory efficient.
If I do this I need an if statement to specify that if the number is between 1-20 that it should be written to a file. Doing is to generate 5000 numbers would take very long. Any takes on how to do this faster and memory efficient.