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]
2 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]2 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
What type of hacker is primarily motivated by an ideology, epitomizing "the ends justify the means" mentality?.
Hunter-Best [27]

The type of hacker that is primarily moved by an ideology, epitomizing "the ends justify the means" mentality is Hacktivism.

<h3>What type of hackers are motivated by social or political issues?</h3>

Hacktivism is known to be an act of the wrong use a computer system or network for a socially or politically motivated  aim or reason.

The type of hacker that is primarily moved by an ideology, epitomizing "the ends justify the means" mentality is Hacktivism and they are called hacktivist.

Learn more about Hacktivism from

brainly.com/question/5483494

#SPJ1

5 0
1 year ago
You are responsible for the administration of your Windows Server 2016 DNS server, which is installed on a domain controller as
kvv77 [185]

Answer:

A. domain adminsb because maybe it might be the right answer.

8 0
3 years ago
If you need to set up direct deposit, which information from your check would you likely need?
Effectus [21]
You just need some direct depodsit forms and who ever paying you and also you need your voided check.Your checking account number,Your bank's ABA or routing number,<span>Your bank's address that's all you need.</span>
6 0
2 years ago
An error occured trying to answer a question on brainly. What should I do?
nikdorinn [45]

You should probably retry answering it. Or two people are already answering it.

-Edge

7 0
2 years ago
Read 2 more answers
You are responsible for creating a shared file system to support a new branch office. The manager has requested shared locations
Natalija [7]

Answer:

Hey do u hve zoo m app??......

5 0
2 years ago
Other questions:
  • A. True
    6·1 answer
  • An international magazine publisher has commissioned you to do a series of images in black and white. The publisher distributes
    13·1 answer
  • Which of the following refers to a feature of wikis that allows the restoring of earlier work in the event of a posting error, i
    9·1 answer
  • A(n _______________ is a pre-written formula that is built into excel
    12·1 answer
  • How many computers/laptop's suported windows 10 pro with a game in vr?
    9·2 answers
  • Can a spreadsheet be filtered only by one column at a time?
    11·1 answer
  • Write a program that reads in an integer, and breaks it into a sequence of individual digits. Display each digit on a separate l
    14·1 answer
  • If you feel your friend had a negative digital identity, what would you do or tell them in order to help them have a positive di
    11·2 answers
  • It took her 9 more months but Marina has managed to save the full $725 plus more to cover fees to pay off the pay-day loan compa
    9·1 answer
  • Which important aspect of the Roman Empire did the barbarians destroy?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!