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

Choose the word or words that would best complete the conversation. Pamela: Hola. ¿Cómo te llamas? ¿De dónde eres? Carolina: Hola. Yo soy Carolina. Colombia. A.
List the fractions 7/12 ,5/6 , 3/4 , 7/8 from least to greatest
Sanjay has been playing golf for only a couple of years and has very little confidence in his game. One day when he was playing by himself, a foursome offered t
Read the excerpt from an 1845 essay by John L. O'Sullivan and answer the question. "It is now time for the opposition to the Annexation of Texas to cease. . .
The energy released from 1 gram of uranium is more than 1 million times greater than the energy released from 3 grams of coal. True False
The two intervals (114.9, 115.7) and (114.6, 116.0) are confidence intervals (computed using the same sample data) for μ = true average resonance frequency (in
What is -6r times (12s) simplified?
A polypeptide has the following amino acid sequence: Met-Ala-Gln-Arg-Glu-Leu. This polypeptide was mutated to produce the following mutant sequence: Met-Ala- Gl
What percent of 60 is 12
Evaluate 6 - 2(-1) +1-51 = 09 01 13