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

Carbon dioxide (CO2), water (H20), and sugar (C6H1206) are all examples of... homogeneous mixtures because they do not have a definite composition, but look the
what is an impact factor on the fall line in georgia history?
In representative government, what do people do? Question 11 options: elect representatives to create laws and run the government elect laws and run the govern
Which of the following excerpts contains an example of literal language? He heard a noise as faint as that of a wasp walking on a window-pane. Darzee was a feat
What type of sentence is, “It’s a tornado!” A. Interrogative B. Imperative C. Declarative D. Exclamatory
please help :) 10 points
The wealth of the Byzantine Roman Empire resulted from:
HELPPPPPPPPPPP what is 7/8 divided by -1/6
» Which three cards have equal values? 3 x 42 4 x 32 3 (40 + 2) 4x (30 + 20) (3 x 40) + (3 x 2) (4 x 3) + (4 x 2)
C.E.R writing spontaneous generation and the scientific