HP 39gII User Manual page 262

Graphing calculator
Hide thumbs Also See for 39gII:
Table of Contents

Advertisement

IF SIDES<2 THEN
MSGBOX("Must be >= 2");
END;
UNTIL SIDES>=2;
END;
// specify num times to roll the dice.
VIEWS "Set Rolls",SETROLLS()
BEGIN
REPEAT
INPUT(ROLLS,"Num of Rolls","N = ","Enter
num rolls",10);
FLOOR(ROLLS) ROLLS;
IF ROLLS<1 THEN
MSGBOX("You must enter a number >= 1");
END;
UNTIL ROLLS>=1;
END;
Plot()
BEGIN
-1 Xmin;
MAX(D1)+1 Xmax;
0 Ymin;
MAX(D2)+1 Ymax;
STARTVIEW(1,1);
END;
The ROLLMANY() routine is another adaptation from a
program presented previously in this chapter. Since you
cannot pass parameters into a program called through a
selection from a custom Views menu, the exported
variables SIDES and ROLLS are used in place of the
parameters that were used in the previous versions.
252
Programming

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents