ok, I got the whole random numbers to do 0-3 and stuff, but is there a way to get it like 2-4? or something like that instead of having 0 i know there is but dont know how... plz help
Printable View
ok, I got the whole random numbers to do 0-3 and stuff, but is there a way to get it like 2-4? or something like that instead of having 0 i know there is but dont know how... plz help
Add 2:
Random numbers 0-3 would be found by rand() % 4, so adding two would get 2-5. This will get 2-4: random = ((rand() % 3) + 2) if you couldn't figure it out.