Finding minimum
SET Minimum to testscore [0]
FOR counter FROM 1 TO length [testscore]
IF testscore [counter]
Input Validation
Ask the user to input a value REPEAT RECEIVE value FROM (INTEGER) KEYBOARD IF value does not meet condition THEN SEND message asking user to try again END IF UNTIL criteria is met
Once implemented, standard algorithms may be saved as
Modules
A collection of prewritten modules is called a library
Find Maximum
SET maximum TO testscore[0] FOR counter FROM 1 TO length [testscore] IF testscore[counter] > Maximum THEN SET Maximum TO testscore[counter] END IF END FOR SEND message & maximum TO display
Linear Search
SEND "Here are the values found" FOR counter FROM 0 TO length [arrayname] IF arrayname [counter] meets criteria THEN SEND arrayname[counter] to display End IF End FOR
Count Occurences
SET totalfound to 0
FOR counter FROM 0 TO length [arrayname]
IF arrayname [counter] meets criteria THEN
SET totalfound TO totalfound + 1
END IF
END FOR
SEND “The number found was” & totalfound TO DISPLAY