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

why does Vietnamese fight the French in Indochina
Describe how you would prepare a supersaturated solution.
Which lines in this excerpt from act I of Shakespeare's Romeo and Juliet are examples of oxymoron?
what is the function filters?
if the two graphs of linear equations do not cross, they are called dependent and inconsistent? True or False
Many trees and plants have green leaves in the summer that turn red, yellow and orange in the fall (autumn). Explain what happens and why it happens.
Which role of marketing research helps address "what if" questions? select one: a. prescriptive b. descriptive c. predictive d. diagnostic?
Describe the role of variations in the adaptation and speciation of the Galapagos Island finches
if you were to solve the following system by substitution what would be the best variable to solve and from what equation? 2x+8y=12 3x-8y=11
Determine the mass of Al(C2H3O2)3 that contains 2.63 Χ 1024 atoms of oxygen.