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
Allushta [10]
3 years ago
14

The template code provided is intended to take two inputs, x and y, from the user and print "pass" if one or more of the followi

ng is true:
x is not less than 4
y is not greater than 5 and x + y is less than 7
However, when using De Morgan's law to simplify this code, the programmer has made some mistakes. Can you correct the errors so the code functions as intended?
/* Lesson 6 Coding Activity Question 2 */
import java.util.Scanner;
public class U3_L6_Activity_Two{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int x = scan.nextInt();
int y = scan.nextInt();
if(!((x 5) || x+y > 7))
System.out.println("pass");
}
}
Computers and Technology
1 answer:
just olya [345]3 years ago
7 0

import java.util.Scanner;

public class U3_L6_Activity_Two{

   public static void main(String[] args){

       Scanner scan = new Scanner(System.in);

       int x = scan.nextInt();

       int y = scan.nextInt();

       if(x>=4|| ((y < 5) && ((x+y) < 7))){

           System.out.println("pass");

       }

   }

}

I'm pretty sure this is what you're looking for. Best of luck.

You might be interested in
Your friend says, “I can’t ever watch a streaming movie without it pausing for long moments. It makes me crazy!” What might you
Naddik [55]

You are required to suggest a solution to the problem of your friend.

The solution to the long pause of the movie when your friend is streaming is to get a <em><u>good internet connection.</u></em>

  • Your friend has a problem with a movie pausing for long moments whenever she is streaming. This is caused by <em><u>poor internet connection</u></em> of your friends device.

  • Internet service providers provides internet connection for users. Your friend should consult her <em>internet service providers</em> to make a complain and they will suggest solutions to her problems.

Read more:

brainly.com/question/24928510

5 0
2 years ago
What answer best explains why improper netiquette is considered dangerous? Individuals who violate user policies are often charg
adell [148]

Answer:

Students become vulnerable to cyberbullying and harassment.

Explanation:

3 0
3 years ago
Read 2 more answers
You find information that you know to be classified on the internet. What should you do.
melomori [17]

A person is to find the information to be classified on the internet  are the best in the screenshot.

What is internet?

The word “internet” is also referred to as “net.” The global system of networks known as the Internet. Online services offered via the Internet include social media, email, and others. The without internet  are the not possible to share the information at the time.

A person is to find the information through which the internet is the best to justify. There used of the internet are the search the information with the help of the internet are the mic, keyboard. The information are the save and the screenshot was the used.

As a result, the person is to find the information to be classified on the internet  are the best in the screenshot.

Learn more about on internet, here:

brainly.com/question/13308791

#SPJ2

5 0
1 year ago
Read 2 more answers
CHALLENGE 7.1.1: Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output f
vlabodo [156]

Answer:

short_names = ["Gus", "Bob", "Ann"]

print(short_names[0])

print(short_names[1])

print(short_names[2])

Explanation:

There are some typos in your code. In addition to the missing part of the code, I corrected the typos.

First of all, initialize the list called short_names. The list starts with "[" and ends with "]". Between those, there are must be the names (Since each name is a string, they must be written between "" and there must be a semicolon between each name)

Then, you can print each name by writing the name of the list and the index of the names between brackets (Index implies the position of the element and it starts with 0)

3 0
3 years ago
What is meant by check digit
Strike441 [17]

Answer:it is the last number in a general digit

Explanation:

6 0
3 years ago
Other questions:
  • Amanda, a project manager, conducted a team meeting consisting of testing and development team. She insisted on clear communicat
    11·1 answer
  • In addition to talking to other doctors remotely, telegraphy technology?
    5·1 answer
  • _______ can be used to prevent busy waiting when implementing a semaphore.
    15·1 answer
  • Desmond must enter a long string of numbers (1 4 9 2 1 6 2 0 1 7 7 6) into an old computer every two hours or the computer will
    12·1 answer
  • There are varying definitions for the term "dumb terminal," but it often refers to the fact that the terminal has
    13·1 answer
  • Blank determines the overall brightness or darkness of an entire image
    5·1 answer
  • William is an HR manager in a textile-manufacturing firm. He is creating a file on the hours each employee worked during the las
    6·2 answers
  • What are the origins of the parking barrier?
    12·1 answer
  • The RAND() function in Excel returns a pseudo-random number between 0 and 1. If you enter this function into 1000 cells (i.e. en
    5·1 answer
  • What happens when you restrict someone on messenger?.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!