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

U.S. Constitution Florida Constitution Legislative branch is called Congress Legislative branch is called Legislature Established post offices Required an elect
A store offers a 10% discount on all merchandise as part of its anniversary sale. Select all statements that are correct. A jar that costs $10 will cost $11 aft
what was unknown in europe before european explorers visited the americans
Explain how the first three steps of scientific inquiry are related..
What should I write about in my Composition Essay?
Two co-teachers, Daniel and Mathew, have to grade a set of math journals. Daniel grades 45% of the journals. Mathew has to grade 121 journals. How many journals
What does the word "valentine" mean?
determine wheter 3x+12+x is equivalent to 4(3+x). use properties of operations to justify your answer. please help! answer only if you know!
what principle provides for a system in which the government derives its power from the governed?
Mrs.Traynor's class is taking a field trip to the zoo.The trip cost $26 for each student.There are 22 students in her class. Round each factor to estimate