what I'm pretty sure I learned in school and what like every website said when I tried to look this up online was that the C++ code for generating a random number with floor: 1 and ceiling 100 (err I guess 101) is:
int number = rand() % 100 + 1;
and that is generating a number... but everytime I compile the program, or run the same program more than once, 'number' always = 8... like everytime...
and I tried changing it to
int number = rand() / 100 + 1;
but then number always = 169.. not really fixing the problem, just changing it.
what am I doing wrong? How do I generate a random number between 1 and 100 in C++ that is not the same every time?