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

Find the slope of the line 3x – 2y = 6
How do you sovle 2x+2y=18 6x+y=39
If the volume for 3-D polyhedra A is 400 cm3 and the volume for 3-D polyhedral B is 800 cm3. How many times bigger is the volume of pyramid B than pyramid A? 20
The distance from the Earth to the sun is 93 million miles. In scientific notation that is _____ miles.
Triangle ABC is congruent to triangle XYZ. Angel A measures 50 degrees. Angle B measures (2x+40) and angle Y (4x+8). Find the value of x. How do I set this up p
Find the slope of the line 3x – 2y = 6
During the Second Industrial Revolution, which building material became one of the most important in the world?
Let f(x) = x2 - 16. Find f-1(x).
Identify the sentence that is not in logical order. a. In these early days of surfing, participating in the sport could determine one's social class. b. The c
After a military coup in Nigeria, economic problems continued because of _____________