HP Prime for All

English  Русский 


FOR var FROM start TO (or DOWNTO) finish [STEP increment] DO command(s) END;


Sets variable var to start; then, for as long as this variable’s value is less than or equal to (or more than for a DOWNTO) finish, executes command(s) and adds (or substract for DOWNTO) 1 (or increment) to var. FOR A FROM 1 TO 10 STEP 2 DO PRINT(A); END; will print 1 3 5 7 9

STEP — Discussion