rand(max)
          0からmaxを越えない範囲の整数の乱数を発生します (maxは正の整数).
          srandが呼ばれない限り, この関数は毎回同じ乱数の並びを返します.

   rand(max)
          Returns a random integer number between 0 and the value of max.
          (max should be positive.) This function produces repeatable
          sequences unless srand is invoked.

between 0 and less than the value of max のほうがいいですね。
今の記述だとmaxもふくまれるようにも読めるので。

-- 
Supercalifragilisticexpialidocious!