Hp Prime Graphing Calculator Manuel d'utilisateur Page 528

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 608
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 527
524 Programming
INPUT(SIDES,"Die Sides","N=","ENTER
num sides",2);
FLOOR(SIDES)
SIDES;
IF SIDES<2 THEN
MSGBOX("Must be >= 2");
END;
UNTIL SIDES >=2;
END;
VIEWS "Set Rolls",SETROLLS()
BEGIN
REPEAT
INPUT(ROLLS,"Num of rolls","N=","Enter
numrolls",25);
FLOOR(ROLLS)
ROLLS;
IF ROLLS<1 THEN
MSGBOX(" u must enter a num >=1");
END;
UNTIL ROLLS>=1;
END;
PLOT()
BEGIN
-1
Xmin;
MAX(D1)+1Xmax;
0
Ymin;
MAX(D2)+1
Ymax;
STARTVIEW(1,1);
END;
The ROLLMANY() routine is an adaptation of the program
presented earlier in this chapter. Since you cannot pass
parameters to 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.
The program above calls two other user programs:
ROLLDIE() and DICESIMVARS(). ROLLDIE()
appears earlier in this chapter. Here is DICESIMVARS.
Create a program with that name and enter the following
code.
Vue de la page 527
1 2 ... 523 524 525 526 527 528 529 530 531 532 533 ... 607 608

Commentaires sur ces manuels

Pas de commentaire