1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IceJOKER [234]
3 years ago
12

Given a string variable s that has already been declared, write some code that repeatedly reads a value from standard input into

s until at last a "Y" or "y"or "N" or "n" has been entered.
Computers and Technology
1 answer:
valina [46]3 years ago
4 0

Answer:

The code to this question can be given as:

Code:

while ((s!="Y" && s!="y" && s!="N" && s!="n"))  //loop for check condition

{

cin >> s;  //insert value

}

Explanation:

The description of the following code:

  • In this code, we use a string variable s that has been to define in question.
  • In code, we use a while loop. It is an entry control loop in loop we check variable s value is not equal to "y", "Y", "n" and "N".  
  • In the loop we use AND operator that checks all value together. If this is true So, we insert value-form user input in string variable that is "s".
You might be interested in
____ is a technology that exists inside another device
Julli [10]

Answer:

Embedded technology is a technology that exists inside another device.

8 0
3 years ago
Read 2 more answers
Does anyone go to connections acadomy​
Komok [63]

Answer:

no I dont where is that at

7 0
3 years ago
Read 2 more answers
Why should cloud computing not be a set of silos? Provide real or made up examples of why incompatible solutions will fail in IT
lesya [120]
2 is tha answer to Why should cloud computing not be a set of silos? Provide real or made up examples of why incompatible solutions will fail in IT.?
8 0
3 years ago
Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
likoan [24]
Test.java

The classname and the filename need to match (case sensitive).
5 0
3 years ago
What is the device used for the calculations of payment and balancing the accounts record s​
Greeley [361]
A calculator or bank? Maybe an atm
6 0
2 years ago
Read 2 more answers
Other questions:
  • A(n) _______ allows an attacker to use a network structure to send large volumes of packets to a victim.
    5·1 answer
  • Several days a week, usually between 8:00 a.m. and 9:00 a.m., users complain of MWI problems. Some have new messages, but their
    11·1 answer
  • Which of the following best define grit
    13·1 answer
  • Which of the following variable names is not valid? 1price 1 price price 1 price1
    15·2 answers
  • Given a Fahrenheit value temperatureFahrenheit, write a statement that assigns temperatureCelsius with the equivalent Celsius va
    9·1 answer
  • __________ are hosted on dedicated computers known as 'web servers'.​
    8·2 answers
  • How is the bootstrap program started?
    6·2 answers
  • Instructions
    8·1 answer
  • How many total bits are required for a direct mapped cache with 16 KB of data and 4 word blocks Assuming a 32 bit address
    12·1 answer
  • Computer science student jones has been assigned a project on how to set up sniffer. What just he keep in mind as part of the pr
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!