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
To save the changes to the layout of a table, click the Save button on the _____.
kari74 [83]
Quick access toolbar :)))))))))
7 0
3 years ago
Under which key category do the Page Up and Page Down keys fall?
Fiesta28 [93]
They are called the navigation keys
7 0
4 years ago
Read 2 more answers
………………….. is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of
frutty [35]
Control <span>is the process of causing a system variable to conform to some desired value. Options Control feedback Design none of the above</span>
4 0
3 years ago
Basic computer programs used by a variety of companies include:
elena55 [62]

Answer:

spreadsheets

Explanation:

every company uses spreadsheets because they are used to list and organize data easily

7 0
3 years ago
What is the main advantage of using a WYSIWYG("what you see is what you get")editor when constructing a website
Tomtit [17]

Answer:

c

12121212121212121212121212121221212121212121212

7 0
3 years ago
Other questions:
  • if there are several web pages that you visit regularly what can you do to make accessing them more efficient?
    13·1 answer
  • Identify the false statement.
    8·1 answer
  • Which company operates a public cloud?<br><br> Lotus<br> Acme<br> Google<br> Symantec
    5·2 answers
  • Wireless attacks avoid the access points to limit detection. <br> a. True <br> b. False
    9·1 answer
  • Which is an unethical use of technology and resources at the workplace?
    13·2 answers
  • To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then y
    6·1 answer
  • What key value does Accenture’s myConcerto bring to clients looking for automated solutions?
    6·1 answer
  • ANSWERED CORRECT BELOW
    7·1 answer
  • What makes a source credible?
    9·2 answers
  • Sigma Technology is a company based in Singapore, with branches in 24 countries. It needs multiple CAs in different locations to
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!