hey there,
i have a piece of coursework to be handed in tomorow and i am struggling to get this new bit of code that has been issued right. i have to write the pseudocode for an atm machine and one of the procedures is to validate a pin number. i already hav the following code written out but i now have to add in that the number must be between 1000 and 9000, if any one can give me an idead of where to go next this would be a big help. many thanx muddpigeon.
PROCEDURE CheckPIN
CONSTANTS
MAXPINS IS 3
VARIABLES
PINCounter IS NUMBER
BEGIN
read data from card
set PINCounter to zero
LOOP UNTIL PINCounter is equal to MAXPINS
input PIN from customer keypad
IF entered PIN matches card PIN
THEN EXITLOOP
ENDIF
add 1 to PINCounter
ENDLOOP
IF PINCounter is equal to MAXPINS
THEN confiscate customer's card
ELSE CALL PROCEDURE Services
ENDIF
END CheckPIN:cheesy: