Hp Prime Graphing Wireless Calculator Manual de usuario Pagina 275

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 334
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 274
Programming in HP PPL 271
RECT();
xincr := (Xmax - Xmin)/318;
yincr := (Ymax - Ymin)/218;
FOR X FROM Xmin TO Xmax STEP xincr DO
FOR Y FROM Ymin TO Ymax STEP yincr DO
color := RGB(X^3 MOD 255,Y^3 MOD 255,
TAN(0.1*(X^3+Y^3)) MOD 255);
PIXON(X,Y,color);
END;
END;
WAIT;
END;
FOR DOWN Syntax: FOR var FROM start DOWNTO finish DO commands
END;
Sets variable var to start, and for as long as this variable
is more than or equal to finish, executes the sequence of
commands, and then subtracts 1 (decrement) from var.
FOR DOWN STEP Syntax: FOR var FROM start DOWNTO finish [STEP
increment] DO commands END;
Sets variable var to start, and for as long as this variable
is more than or equal to finish, executes the sequence of
commands, and then subtracts increment from var.
WHILE Syntax: WHILE test DO commands END;
Evaluates test. If result is true (not 0), executes the
commands, and repeats.
Example: A perfect number is one that is equal to the sum
of all its proper divisors. For example, 6 is a perfect
number because 6 = 1+2+3. The example below returns
true when its argument is a perfect number.
EXPORT ISPERFECT(n)
BEGIN
LOCAL d, sum;
2 d;
1 sum;
WHILE sum <= n AND d < n DO
IF irem(n,d)==0 THEN
sum+d sum;
Vista de pagina 274
1 2 ... 270 271 272 273 274 275 276 277 278 279 280 ... 333 334

Comentarios a estos manuales

Sin comentarios