11-06-2022, 11:51 AM
Hello
Please modify the code.
Normal inputs are: zero (inclusive) to 6
How to convert the code so that the option without entering digits after pressing the Enter key, T # takes the value 7.
Thank You
PRINT "Enter a digit"
K$ = "": F$ = ""
WHILE LEN(K$) < 1 AND F$ <> CHR$(13)
F$ = ""
WHILE F$ = "": F$ = INKEY$: _LIMIT 30: WEND
IF F$ = CHR$(27) THEN 15
IF F$ = CHR$(32) THEN 20
IF F$ <> CHR$(13) THEN K$ = K$ + F$
WEND
T# = VAL(K$): PRINT T#
Please modify the code.
Normal inputs are: zero (inclusive) to 6
How to convert the code so that the option without entering digits after pressing the Enter key, T # takes the value 7.
Thank You
PRINT "Enter a digit"
K$ = "": F$ = ""
WHILE LEN(K$) < 1 AND F$ <> CHR$(13)
F$ = ""
WHILE F$ = "": F$ = INKEY$: _LIMIT 30: WEND
IF F$ = CHR$(27) THEN 15
IF F$ = CHR$(32) THEN 20
IF F$ <> CHR$(13) THEN K$ = K$ + F$
WEND
T# = VAL(K$): PRINT T#