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
Which aspect of design theory describes the relationship of one object to another in size? A.value B.form C.proportion D.tecture
pashok25 [27]

Answer:

<u>Proportion </u>is the aspect in design theory that describe the relationship of one object to another object in size.

Explanation:

Proportion is an important aspect in design theory in terms of size. It refers to the relationship between object of the design in terms of size. The relation between size of different object in design theory can describe as, if the size of one object increases or decreases, it may leads to change in size of other object. It is called proportion.

If the size of one object increase with the size of other object, the relation is called direct proportion. If the size of one object decrease with the increase in size of other object is called inverse proportion.

7 0
3 years ago
Write a c++ program that accepts a string from the user and then replaces all occurrences of the letter e with the letter x
mixer [17]

Answer:

#include <iostream>

using namespace std;

int main()

{

   string str;

   cout<<"Enter the string: ";

   cin>>str;

   for(int i=0;str[i]!='\0';i++){

       if(str[i]=='e'){

           str[i]='x';

       }

   }

   cout<<"the string is: "<<str<<endl;

  return 0;

}

Explanation:

First, include the library iostream for using the input/output instructions.

Create the main function and declare the variables.

Then, use the cout instruction and print the message on the screen.

cin store the string enter by the user into a variable.

After that, take a for loop and if-else statement for checking the condition if the string contains the 'e', then change that alphabet to 'x'.

This process continues until the string not empty.

Finally, print the updated string.

6 0
3 years ago
A server is a special kind of computer that manages access to resources such as files, applications, peripherals, emails, and we
Basile [38]

Answer:

true

Explanation:

6 0
3 years ago
Read 2 more answers
Lisa manages incident response for a bank. The bank has a website that’s been attacked. The attacker utilized the login screen,
kari74 [83]

Answer:

The answer is C) SQL Injection

Explanation:

Cross-Site Scripting (XSS) attacks are a type attacks that occur when an attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.

Cross-Site Request Forgery (CSRF) is a type of attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request.

SQL Injection is a type of cyber security attack where an attacker inputs a malicious input into an SQL statement., and the SQL server reads it as programming code.

Address Resolution Protocol poisoning (ARP poisoning) is a form of attack in which an attacker changes the Media Access Control (MAC) address and attacks an Ethernet LAN by changing the target computer's ARP cache with a forged ARP request and reply packets.

From the above brief definition; it is seen that the answer is C) SQL Injection.

3 0
3 years ago
8. Understanding the proper classification of a problem or fault
kati45 [8]

Answer:

a

Explanation:

because the trust need to know what was the problem in the first place

8 0
3 years ago
Other questions:
  • Suppose you're trying to remove the clamp from a ground strap that's connected to a battery. The clamp won't come loose. Which o
    14·2 answers
  • In his work for a new company, Byron found a flower material that he could use to manufacture dresses. In his career, Byron is m
    15·2 answers
  • ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13. The last digit d13 is a check
    9·1 answer
  • This semester we looked at three languages (C++, Java and Python). One common rule in all three class checklists (for C++, Java
    11·1 answer
  • How people have contributed to the advancement of science
    7·1 answer
  • Write a program that finds the largest in a series of numbers entered by the user.The program must prompt the user to enter numb
    12·1 answer
  • Write a WHILE loop that lets the user enter a number.
    14·1 answer
  • Linda is searching for a new job. Which information would her potential employers likely review in her social profile?
    14·2 answers
  • What is an automatic update and when should you use it
    10·1 answer
  • Please answer this question​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!