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

The slope of a line is positive. Describe what happens to the value of x as y increases.
phone plan. The monthly cost c of marge's phone plan is given by c=40 + m, where m is the number of extra minutes she uses in that month. Name the slope and y-i
Write a number with three decimal places greater than 0.79 and less than 0.8 Its for my little brother Thanks in advance
Which of these examples describes a pioneer species that is starting primary succession? a-ferns growing at the base of trees in a forest after a fire b-grass g
What is 0.2 as a whole number?
Can you explain what mitochondria are? Where are mitochondria found?
All of the following are steps the country of Morocco took to increase gender equality in society except __________. A. the expansion of school transportation B
What does each of the facts shown above tell you about the element on the periodic table
Rural slaves of Rome worked on latifundia and were often shackled together and treated harshly. True False
Which of the following cell organelles surrounds the nuclear membrane? A; rough endoplasmic reticulum B; smooth endoplasmic reticulum C; the Golgi apparatus