I would like to get a random integer between 1 and 10 in C++ using the least amount of code possible, with the start and stop values being inclusive.
I'm aware of the rand()
function, but how can I use it to get an integer in this range?
Thank you!