";N "Ask for n
30 LET F=1 "Set start value of F to 1
40 FOR I=1 TO N STEP 1 "counts I from 1 to N
50 LET F=F*I "calculates F=F*I
60 NEXT I "repeats loop from line 40
70 PRINT USING "##";N;"!="; USING ;F "print result - i.E.