kingdrex8418 kingdrex8418
  • 15-09-2022
  • Computers and Technology
contestada

Given a string variable s that has already been declared, write some code that repeatedly reads a value from console input into s until at last a y or y or n or n has been entered.

Respuesta :

andrew1392410
andrew1392410 andrew1392410
  • 15-09-2022

Answer:

s = "";

while (!(s=="Y" || s=="y" || s=="N" || s=="n"))

{

   cin >> s;

}

Answer Link

Otras preguntas

How To Solve The Equation 3(x-6)=10x+3 ?
what are the principal parts of a verb?
How To Solve The Equation 3(x-6)=10x+3 ?
Which of the following expressions represents 24C12? A) 12!/24! B 24!/24! C) 24!/ 12!•12! D) 24!/12!
a matchbox tray slides into its outer cover in how many different ways can you do this
Is it possible to make CD without plastic? why or why not?
could you tell me what is nonfiction?
what does 'butterfingers' mean?
Factor the following and find the zeros.1. x2 - 169 = 0                2. x2 + 14X + 49 = 03. x2 - 17x + 42 = 0        4. 2X2 - 9X - 5 = 05. 3X2 + 11X - 4 =0
how do people in Italy use there natural resources