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

If water and ethanol both have all 3 intermolecular bonds, why does ethanol evaporate so much quicker?
The angular speed of a propeller on a wind generator is 10.3 revolutions per minute. Express this angular speed in radians per minute.
book is 24 dollars. Ben pays 25.02. what is sales tax rate.
book is 24 dollars. Ben pays 25.02. what is sales tax rate.
A toy company produces two kites whose shapes are geometrically similar. Find the length of the missing side of the smaller kite
Steve has 120 feet of fence to make a rectangular kennel for his dogs. He will use his house as one side. Write an algebraic expression for the kennel's length.
A salesperson ratio of successful signups to the number of people called is .125.  This month, the salesperson has 25 signups.  How many people did the salesper
why did Hitler feel justified in taking over Austria and the Sudetenland?
Why did the colonists call the acts intolerable
How many angles does a cube have?