0

While Loop

Hi everyone! Can you please help here, how do you write an input validation loop that asks the user to enter ‘Y’, ‘y’, ‘N’, or ‘n’. And also an input validation loop that asks the user to enter “Yes” or “No”.

24th Apr 2020, 8:57 PM
Robert M
Robert M - avatar
2 Answers
+ 1
Hi, I created an example with single key input for you. The user input is simulated as ReadKey does not work with C# runner of SoloLearn. https://code.sololearn.com/cirMJ4z8wxzj/?ref=app Maybe you can try transfer this example to a check for "Yes" or "No" by yourself to see if you got it :) Greets, Manu
24th Apr 2020, 9:30 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar
0
Thanks a lot
24th Apr 2020, 9:32 PM
Robert M
Robert M - avatar