I'll start it off with one from the HSC 2001 paper question 22
BEGIN Main Program
UpdateInventory
END
------------------------------------------------------------------------------------
BEGIN Update Inventory
Open Inventory File
Open Transaction File
REPEAT
Get transaction.stocknumber(x)
Find Transaction.stocknumber
IF Transaction.stocknumber(x) = Inventory.Stocknumber(x) THEN
Transaction.quantity = Inventory.quanity + Transaction.quantity
ELSE
IF Transaction.stocknumber(x) <> inventory.stocknumber(x) THEN
NoMatchFound
ENDIF
IF inventory.quantity < 3 THEN
Error Message
ENDIF
END IF
UNTIL there are no more transactions
END
------------------------------------------------------------------------------------
BEGIN Find Transaction.stocknumber
REPEAT
Inventory.stocknumber(x) = Inventory.stocknumber(1)
IF Inventory.stocknumber(x) = Transaction.stocknumber(x) THEN
Foundit = True
ELSE
Inventory.stocknumber(x) = Inventory.stocknumber(x + 1)
Until Foundit = True
END
------------------------------------------------------------------------------------
BEGIN NoMatchFound
Print Message No match between inventory.stocknumber(x) AND transaction.stocknumber(x).
END
------------------------------------------------------------------------------------
BEGIN ErrorMessage
Print Message Warning there is less then then 3 of stocknumber(x) in inventory
END