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

ds Given the velocity v = dt and the initial position of a body moving along a coordinate line, find the body's position at time t. v = 9.8t + 12, s(0) = 20
Eve's Apples opened for business on January 1, 2021, and paid for two insurance policies effective that date. The liability policy was $52,200 for 18 months, an
can somone help me with this please
What is an enzyme? A. Along chain of amino acids B. A protein that speeds up chemical reactions in a living thing C. A molecule that carries genetic information
You see a green buoy. What should you do?
What did Stokely Carmichael mean by the term "black power"?African Americans should use money to buy equality.African Americans could use nonviolence to gain po
During January, its first month of operations, Dieker Company accumulated the following manufacturing costs: Raw materials $4,500 on account, factory labor $8,
Mr Lorenzo must make a minimum of 48 circuit boards per day. On Wednesday he made 60. What percent of required minimum did he make
What is feng shui? Group of answer choices the use of herbal concoctions to cure disease the burning of paper objects to appease the ancestors the art of arr
One reason for the wave of FDI into the United States by Japanese auto companies was partly in response to