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

Emily is selecting a new paint color for her bedroom. she detects a difference between sky blue and midnight blue. emily's ability to distinguish these two colo
A teacher can grade 25 papers in 4 hours. How many papers can he grade in 6 hours?
The entire South did not succumb to the mystique of cotton. Based on this statement, which of the following is true A.Virginia and North Carolina continued to d
Physically active young women, especially those who engage in activities like long distance running which require endurance, are most at risk for which deficien
a plane traveled west for 4.0 hours and covered a distance of 4400 kilometers whats the velocity
Phospholipids are complex molecules with a lipid "tail" and a phosphate "head." which end interacts with water?
What is the correct senteces? Jon won't (win the race) because he's got a map
An airplane leaves an airport and flies due west 150 miles and then 170 miles in the direction S 49.17°W. How far is the plane from the airport (round to the ne
Saint augustine ____. was an idealist was a materialist was a pragmatist thought of reality as an illusion thought of reality as a continuum with humans somewhe
JKLM is translated according to the rule (x,y) (x+5,y-4) what are the coordinates of .0