:randInt(lowNum, highNum)

The command randInt( provides a random integer between the first argument and the second. randInt( can be used to provide a number for guessing games.

This function is not available on some calculators. int(rand*(highNum-(lowNum-1)))+ lowNum may be used instead.

:randInt(lowNum, highNum, numTrials)

This creates a numTrials length list that is composed of random integers between lowNum and highNum.

Location Edit

  • Math
  • PRB
  • 5:randInt(

Example Edit

:Input "HIGH NUM?",S
:Input "LOW NUM?",E
:Disp N

This program clears the screen, then asks for the starting number (the first argument), the ending number (the second argument), and displays the result.