Write a code segment that reads a string from cin. The string should be one of the following: "Yes", "No", "yes", or "no". If it is not, the user should be prompted to input an appropriate response, and the process should repeat. Once a valid response is received, the bool variable yes should be assigned true if the response is "Yes" or "yes" and false if the response is "No" or "no".
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.