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
Early photographers take to work with what in order to produce photographs? (Btw this is photography, it just isn't a subject in
Kruka [31]
1, they used to use chemicals.
4 0
3 years ago
A technician is performing Windows preventative maintenance tasks on all computers in the organization. She wants a way to creat
antiseptic1488 [7]

Answer:

The tool that allows to configure a custom console is "mmc.exe".

Explanation:

MMC is a Microsoft Management Console. It is used to customize the management console and add the tools in console that are required by the technician.

3 0
3 years ago
Create a program that contains 4 methods / functions... main(), getTestScores(), calcAverage(), and displayAverage(). The main()
jeyben [28]

Answer:

import java.util.Scanner;

public class  num6{

   static int getTestScores(){

       System.out.println("Enter the Score");

       Scanner in = new Scanner(System.in);

       int score = in.nextInt();

       return score;

   }

   static double calcAverage(int score1, int score2, int score3){

       return (score1+score2+score3)/3;

   }

   static void displayAverage(double ave){

       System.out.println("The Average is "+ave);

   }

   public static void main(String[] args) {

       int num1 = getTestScores();

       int num2 = getTestScores();

       int num3 = getTestScores();

       //Calling Calculate Average

       double average = calcAverage(num1,num2,num3);

       //Calling displayAverage

       displayAverage(average);

   }

}

Explanation:

  • Using Java programming Language
  • Create the four methods
  • getTestScores() Uses the Scanner Class to receive an in variable and return it
  • calcAverage() accepts three ints as parameter calculates their average and return it
  • displayAverage() Accepts a double and prints it out with a concatenated string as message
  • In the Main Method, getTestScores is called three times to obtain three numbers from the user
  • calAverage is called and handed the three numbers
  • printAverage is called to output the calculated average
8 0
2 years ago
Graphic design has as its goal the communication of some __________ message to a group of people.
Aleks [24]
Graphic design has as its goal the communication of some specific message to a group of people.

Specific is your answer.
3 0
2 years ago
What is the index of 7 in this list?<br> [5, 6, 10, 7, 3, 2.51]
kotykmax [81]
5 or 7 I believe Good luck!
6 0
2 years ago
Read 2 more answers
Other questions:
  • WHAT IS SQL AND HOW CAN YOU MEET THE DATA REQUIREMENTS ALSO MAINTAINING DATA INTEGRITY,AND LASTLY STATE THE FULL MEANING OF SQL
    11·1 answer
  • Variable names may contain spaces and punctuation symbols. True False
    15·1 answer
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    8·2 answers
  • The variable grade can have any real number value from 0 to 100. Ask the user to enter a grade in numerical form. Write an if-el
    9·1 answer
  • Question 16 (2 points) Question 16 Unsaved
    11·1 answer
  • Who is the owner of microsoft company​
    12·1 answer
  • Why is brainly not working it say im logged out rn but im not i cant acces anything but this
    12·2 answers
  • Yall rachits and yall eat butt xD
    10·2 answers
  • Based on a Supreme Court ruling, an Internet-based merchant needs to charge sales tax only when _____.
    9·1 answer
  • Complete the problem about Olivia, the social worker, in this problem set. Then determine the telecommunications tool that would
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!