Given a char variable c that has already been declared, write some code that repeatedly reads a value from console input into c until at last a 'Y' or 'y' or 'N' or 'n' has been entered.

PHOTO EMBED

Fri Sep 22 2023 21:48:36 GMT+0000 (Coordinated Universal Time)

Saved by @David_Mix

cin >> c;
while (c != 'y' && c != 'Y' && c != 'N' && c != 'n')
  cin >> c;
content_copyCOPY