random(integer)
#1

random(5);

does this include 'zero' too ??
Reply
#2

yes. the result will be a number from 0 to n-1 (inclusive), therefore the 5 is omitted.

it might help to take the parameter as a modulus operator for easy remembering
Reply
#3

thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)