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

what is the area of the parallelogram? A. 54 square millimeters B. 27 square millimeters C. 152 square millimeters D. 76 square millimeters
What is the area of the polygon? A. 136.5 in2 B. 168 in2 C. 172.5 in2 D. 240 in2
chen is thinking of three numbers he says, the range is 5 the mode is 2 what are his three numbers
do you think police brutality ( excessive use of force) is a problem in america?
Which word is associated with a domesticated animal? A. feline B. leonine C. serpentine D. ursine
this fence has three posts,equally spaced .each post is 15 centimetres wide. the length of the fence is 153 centimetres. calculate the length of one gap betwee
Name two integers whose product is -18 and whose quotient is -2
The store is offering a sale pack of video games for $43.88. What is the unit price of a video game in the sale package
Can someone help me ?? T times 3/4 for t = 8/9
Because of Aryanization A. better schools were built for German children B. many Jews lost their jobs and professional licenses C. Aryan men and women were forb