How to resolve the algorithm Keyboard input/Obtain a Y or N response step by step in the MUMPS programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Keyboard input/Obtain a Y or N response step by step in the MUMPS programming language
Table of Contents
Problem Statement
Obtain a valid Y or N response from the 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.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Keyboard input/Obtain a Y or N response step by step in the MUMPS programming language
Source code in the mumps programming language
for read !,"Enter Y or N to continue: ",input quit:input?1(1"Y",1"y",1"N",1"n")
You may also check:How to resolve the algorithm Generator/Exponential step by step in the Java programming language
You may also check:How to resolve the algorithm Knuth shuffle step by step in the Arturo programming language
You may also check:How to resolve the algorithm Quine step by step in the Phix programming language
You may also check:How to resolve the algorithm Permutations by swapping step by step in the C programming language
You may also check:How to resolve the algorithm Count in factors step by step in the DCL programming language