Programming
251
The program
DiceSimulation
START()
BEGIN
DICESIMVARS();
// Empty data columns D1 and D2
{} D1;
{} D2;
SETSAMPLE(H1,D1);
SETFREQ(H1,D2);
0 H1Type;
END;
VIEWS “Roll Dice”,ROLLMANY()
BEGIN
LOCAL k,roll;
MAKELIST(X+1,X,1,2*SIDES-1,1) D1;
MAKELIST(0,X,1,2*SIDES-1,1) D2;
FOR k FROM 1 TO ROLLS DO
Roll:=ROLLDIE(SIDES)+ROLLDIES(SIDES);
D2(roll-1)+1 D2(roll-1);
END;
-1 Xmin;
MAX(D1)+1 Xmax;
0 Ymin;
MAX(D2)+1 Ymax;
STARTVIEW(1,1);
END;
VIEWS "Set Sides", SETSIDES()
BEGIN
REPEAT
INPUT(SIDES,"Die Sides","N = ","Enter num
sides",2);
FLOOR(SIDES) SIDES;
Содержание 39gII
Страница 1: ...HP 39gII graphing calculator user s guide Edition1 Part Number NW249 90001 ...
Страница 2: ...Printing History Edition 1 November 201 1 ...
Страница 32: ...22 Getting started ...
Страница 58: ...48 Apps and their views ...
Страница 70: ...60 Function app ...
Страница 80: ...70 Solve app ...
Страница 132: ...122 Parametric app your own table and the split screen functionality available in the Function app ...
Страница 136: ...126 Polar app ...
Страница 140: ...130 Sequence app ...
Страница 148: ...138 Finance app ...
Страница 152: ...142 Linear Solver app ...
Страница 218: ...208 Matrices ...
Страница 226: ...216 Notes and Info ...
Страница 238: ...228 Variables and memory management ...
Страница 318: ...308 Programming ...
Страница 340: ...330 Reference information ...
Страница 346: ...vi Product Regulatory Information ...