Keyboard input/Obtain a Y or N response: Difference between revisions
Keyboard input/Obtain a Y or N response (view source)
Revision as of 22:50, 9 January 2019
, 5 years ago→{{header|BASIC}}
(→{{header|ncurses}}: rename screen option) |
|||
Line 109:
140 LOOP UNTIL K$="y" OR K$="n"
150 PRINT "The response was ";K$</lang>
==={{header|GWBASIC}}===
<lang gwbasic>10 cls: Print "Press Y or N to continue."
20 WHILE T$<>"y" AND T$<>"Y" AND T$<>"n" AND T$<>"N"
30 T$=""
40 WHILE T$=""
50 T$ = INKEY$
60 WEND
70 IF T$<>"y" AND T$<>"Y" AND T$<>"n" AND T$<>"N" THEN BEEP
80 WEND
90 PRINT "The response was "; T$
</lang>
==={{header|Locomotive Basic}}===
|