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
Kobotan [32]
3 years ago
6

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.
Computers and Technology
1 answer:
qaws [65]3 years ago
8 0

Answer:

Explanation:

RESPONSE = stdin.nextInt();

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

YESCOUNT++;

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

}

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

NOCOUNT++;

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

}

else

System.out.println("INVALID");

You might be interested in
What is the code for Pong that would work on Khan Academy?
Rashid [163]
Draw = function() {
if () {
if (keyCode === ){
();
}
else if (keyCode === ) {
();
}
}
};
7 0
2 years ago
What is Game Theory?
AleksandrR [38]

Answer:

the branch of mathematics concerned with the analysis of strategies for dealing with competitive situations where the outcome of a participant's choice of action depends critically on the actions of other participants

Explanation:

In simple terms Game theory is the study of how and why people make decisions.

8 0
2 years ago
Each codec is stored within a file called a(n) ____ file.
frutty [35]
Im like 90% sure its a container file
5 0
3 years ago
rite a function to prompt the user to enter the information for one movie (title, release date, mpaa rating and number of stars)
vesna_86 [32]

Answer:

import java.util.*;

public class Movie {

   

   public static void main (String [] args) {

       

       System.out.println(movieInfo());

       

   }

   public static String movieInfo() {

       Scanner input = new Scanner(System.in);

       Scanner input2 = new Scanner(System.in);

       

       System.out.print("Enter the title: ");

       String title = input.nextLine();

       System.out.print("Enter the release date: ");

       String releaseDate = input.nextLine();

       System.out.print("Enter the mpaa rating: ");

       double mpaaRating = input2.nextDouble();

       System.out.print("Enter the number of stars: ");

       double numberOfStars = input2.nextDouble();

       

       return "Title: "+title+ "\nRelease Date: "+releaseDate+ "\nMPAA Rating: "+ mpaaRating+ "\nNumber of Stars: "+numberOfStars;

   }

}

Explanation

- Create a function called <em>movieInfo()</em> that returns a string, information about a movie

- Ask the user to enter the title, release date, mpaa rating and number of stars of the movie.

- Return these values at the end of the function

- Inside the main, call the function to see the information about the movie

7 0
3 years ago
Alt text is considered a(n ____ attribute because it provides access to everyone who visits your site.
Vikentia [17]
Alt text is considered an accessibility attribute...
8 0
3 years ago
Other questions:
  • In 2–3 sentences, describe how you would insert a table into a word-processing document.
    9·2 answers
  • How does theatre compare with movies or television? What makes it similar to movies and television? What makes it different?
    13·1 answer
  • A client-server relationship is the basic form of a ____?
    15·1 answer
  • What are the advantages and disadvantages of malware maintenance?
    12·1 answer
  • How would you define a relational database ?
    12·1 answer
  • A type of backlight technology most commonly used in modern laptop devices is called____________.
    9·1 answer
  • In Microsoft Word you can access the _______ command from the "Mini toolbar." 
    9·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • In what ways can you modify the location of the neutral point?
    11·1 answer
  • Which operating system might cause the desktop background to change unexpectedly?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!