RosettaCodeData/Task/Keyboard-input-Obtain-a-Y-or-N-response/00DESCRIPTION
2016-12-05 22:15:40 +01:00

9 lines
502 B
Text

[[user input::task| ]]
;Task:
Obtain a valid   '''Y'''   or   '''N'''   response from the [[input device::keyboard]].
The keyboard should be flushed, so that any outstanding key-presses are removed, preventing any existing   '''Y'''   or   '''N'''   key-press from being evaluated.
The response should be obtained as soon as   '''Y'''   or   '''N'''   are pressed, and there should be no need to press an   enter   key.
<br><br>