HP Prime Graphing NW280AAABA manual Sides, Begin Repeat, SIDES= Floorsides If SIDES2 then

Models: Prime Graphing NW280AAABA

1 616
Download 616 pages 24.49 Kb
Page 531
Image 531

FOR k FROM 1 TO ROLLS DO roll:=ROLLDIE(SIDES)+ROLLDIE

(SIDES);

D2(roll-1):= D2(roll-1)+1; END;

Xmin:= -0.1; Xmax:= MAX(D1)+1; Ymin:= −0.1; Ymax:= MAX(D2)+1; STARTVIEW(1,1);

END;

VIEW "Set Sides",SETSIDES()

BEGIN REPEAT

INPUT(SIDES,"Die Sides","N=","Enter# of sides",2);

SIDES:= FLOOR(SIDES);

IF SIDES<2 THEN

MSGBOX("# of sides must be >= 4"); END;

UNTIL SIDES >=4;

STARTVIEW(7,1);

END;

VIEW "Set Rolls",SETROLLS()

BEGIN REPEAT

INPUT(ROLLS,"Num of rolls","N=","Enter# of rolls",25);

ROLLS:= FLOOR(ROLLS);

IF ROLLS<1 THEN MSGBOX("You must enter a num

>=1");

END;

UNTIL ROLLS>=1;

STARTVIEW(7,1);

END;

Plot()

Programming in HP PPL

525

Page 531
Image 531
HP Prime Graphing NW280AAABA manual Begin Repeat, SIDES= Floorsides If SIDES2 then, Until Sides =4 STARTVIEW7,1 END