11-06-2022, 01:27 PM
An example which uses INPUT$(1) to build a string of digits from 1 -6, as a sort of passcode, which seems a bit more like the original post:
Code: (Select All)
Print "Enter the passcode. (All digits are from 1 to 6.) =>";
Do
Do
K$ = Input$(1)
Loop Until (K$ >= "0" And K$ <= "6") Or K$ = Chr$(13)
Print K$;
response$ = response$ + K$
Loop Until K$ = Chr$(13)
Print
Print response$