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

Which is true of the phospholipid bilayer of the cell membrane? A. There is a hydrophobic side inside the cell. B. There is a water-fearing side inside the cell
TRUE or FALSE. According to universal gravitation, both mass and air resistance affect the gravitational attraction between objects.
Use the Distributive Property to simplify the expression. (10 + 4y) 1/4 if possible, (so I can use it as reference later on.) how did you come to the answer? i
Which of the following is not a part of Earth’s system? a. hydrosphere b. geosphere c. biosphere d. chronosphere
Which of these prompts would require a persuasive essay? Select all that applies A) Why is math taught at school? B) Videogames are effective educational tools
Read Abraham Lincoln's Letter to fellow Republican James T. Hale. In this letter, President Lincoln suggests a compromise with the South’s demands to keep the U
What is the quotient of 36 divided by 3/4??
Does light have an endpoint?
What happens while Cassius and Brutus are in the tent that shows that someone knows they are arguing?
What is the relationship between the two parts of the nervous system