The one-dimensional array m [15] should be filled with random numbers. Tried so

for(i = 0; i < 15; i++) { m[i] = rand() % 100; } 

The program works, the numbers are set, but for some reason they are always the same, i.e. always creates the same array with the same numbers. How to make the numbers different each time.

    1 answer 1

    At the beginning of the program call

     #include <ctime> srand(time(NULL));