I'm not sure whether this question is asked before, but I'm hurrying to get the solution. Everyone please helps.
To generate a serial (string) that is a combination of English letters or/and numbers.
In other words, each char in the serial must be 'IN ['A'..'Z', 'a'..'z', '0'..'9']'.
The serial contains 8 char. All char must be generated randomly.
My algorithm (I'm using Dev-Pascal but it doesn't work):
VAR i: integer;
FOR i:= 1 TO 8 DO
IF NOT (s1[i] IN ['0'..'9', 'A'..'Z', 'a'..'z']) THEN check:= FALSE