answer.
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
Mashcka [7]
2 years ago
14

Given a int variable named yesCount and another int variable named noCount and an int variable named response write the necessar

y code to read a value into into response and then carry out the following: if the value typed in is a 1 or a 2 then increment yesCount and print out "YES WAS RECORDED" if the value typed in is a 3 or an 4 then increment noCount and print out "NO WAS RECORDED" If the input is invalid just print the message "INVALID" and do nothing else. ASSUME the availability of a variable, stdin, that references a Scanner object associated with standard input.
Computers and Technology
1 answer:
sergejj [24]2 years ago
6 0

// This command takes input from the user.

Scanner input = new Scanner(System.in);

int response= input.nextInt();

// Making the variables required

int noCount =0 ;

int yesCount =0;

// Checking the response if it is 1 or 2 and reporting accordingly

if(response == 1 || response ==2){

 yesCount+=1;

 System.out.println("YES WAS RECORDED");

}

// Checking if the input is 3 or 4 then printing the required lines

else if (response == 3 || response ==4){

noCount+=1;

 System.out.println("NO WAS RECORDED");

}

// if the input is not valid than printing INVALID

else{

System.out.println("INVALID");

}

 

 

 

You might be interested in
Poor quality lateral communication will result in which ofthe
zhuklara [117]

Answer:

b

Explanation:

b, lack of coordination

3 0
2 years ago
Read 2 more answers
An online article in 2001 described a study in which twelve sixth-grade students who had not previously played chess participate
ipn [44]
Bdbxhdhdhdbxbdhdhxhxhdhdhdhdhdhdhdhdhdbdhdhdhdhdhdhrhrhrhrhrhdhdhdhdisisieiejjdidieieieieieiei
6 0
2 years ago
) A byte is used to represent a single character in the computer ______<br> true or false?
sdas [7]
Answer: false
Explanation:
7 0
1 year ago
Read 2 more answers
REST Basics REST is a protocol and a set of operations that many web services conform to in order to exchange information and in
vekshin1

Answer:

The answer is "Option A and Option C".

Explanation:

In choice a, it is true since a client-server design can be used for REST-application. A user is somebody who needs space and it doesn't deal with storing data on a central computer. A client is someone with the money, and the interface does not. Its server doesn't want to worry regarding core functionality on the ends of the server. The server does not have to know anything at all about the layer of UI used at the end of the server.

In choice c, it is true As just a Web app, services like corporate/employee resources must be organized, and HTTP verbs like the GET, Place, POST, DELETE must be used to modify these. It must be obvious, as a programmer, that what is required is clearly to look only at the interface or HTTP method used.

7 0
1 year ago
Computer programmers often use binary codes (strings of 1s and 0s) to write programs for computers. These codes are then changed
PilotLPTM [1.2K]

Answer:

Bottom Up Processing.

Explanation:

Bottom-up processing relates to how sensory information is interpreted as it comes in.  When I flash a generic picture on the monitor, the features will be identified by your eyes, your brain will put it together and you will interpret an eagle image.  

Bottom-up refers to how it is assembled from the tiniest pieces of sensory data.In the bottom-up processing when the codes are changed into the patterns that the computer recognizes as words, pictures, etc

7 0
2 years ago
Other questions:
  • Which of the following statements is not true about proper tire care? a.If you see a wear bar across the width of the tread whil
    14·2 answers
  • A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
    9·1 answer
  • Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv
    5·1 answer
  • Why is the following statement true - ideally, your information is abbreviated
    10·2 answers
  • Why can a failure in a database environment be more serious than an error in a nondatabase environment?
    15·2 answers
  • Which of the following provides a suite of integrated software modules for finance and accounting, human resources, manufacturin
    15·1 answer
  • Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
    7·2 answers
  • Krista needs to configure the default paste options in PowerPoint 2016. Which area of the Options dialog box will she need to us
    14·1 answer
  • In the graph shown here, by what percentage are the number of people in computer occupations in general projected to increase?
    10·2 answers
  • An aviation tracking system maintains flight records for equipment and personnel. The system is a critical command and control s
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!