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
Elizabeth has an assignment to complete. in her internet search, she got 5,006,321 hits. to narrow the search, she would convert
ivolga24 [154]
In order to narrow the search and get more precise and more efficient Internet research, Elizabeth should use unique and specific terms, should not use common words, she could use some search engines also (Exploratium, Teoma,...) ..., use different search engines search engines, like Yahoo!, Bing, Startpage, or Lycos.
6 0
2 years ago
Read 2 more answers
Which of the following information sources was not directly affected by the Telecommunications Act of 1996?
VMariaS [17]
Apparently, the answer is newspaper publishing.

Since telecommunication is defined to use wireless and electrical protocols to transmit data.
6 0
3 years ago
1. How are computers helpful
d1i1m1o1n [39]

Answer:

Brainliest

Explanation:

It’s hard to imagine banks without technology. In fact, computers have been in use in banking since the 1950s, when Bank of America introduced a computer designed specifically for processing checks. Each new decade has brought innovations that change the way banks manage daily operations and serve customers. Today, you may not even leave your house to do your banking. As much as technology has changed the use of the computer in the banking sector, banks continue to adjust the way they do things.

8 0
3 years ago
To save a file in word, you can select File, Save (save as), select the location, type the file name, and select save. What is t
Inessa [10]

Answer:

The answer to this question is given below in the explanation section

Explanation:

To save a file in word, you can select File, Save (save as), select the location, type the file name, and select save.

If you want to save the file in word using shortcut. Then, for saving the file, you need to press Ctrl+S. If you want to save the file as (Save as), then you need to press F12.

3 0
3 years ago
Create the HTML code for this
Marta_Voda [28]

Answer:

index.html:

<!DOCTYPE html>

<html>

 <head>

   <title>Brainly</title>

   <link href="style.css" rel="stylesheet" type="text/css" />

 </head>

 <body>    

   <table id="myTable">

     <caption>Duty Roster for last two days</caption>

     <tr><th>Day</th><th>Morning</th><th>Afternoon</th></tr>

     <tr><td>Monday</td><td colspan="2">John</td></tr>

     <tr><td>Tuesday</td><td rowspan="2">Tom</td><td>Peter</td></tr>

     <tr><td>Wednesday</td><td>simon</td></tr>

   </table>

 </body>

</html>

<u>style.css:</u>

#myTable {

 background-color: Cyan;

 border-collapse: collapse;  

 height: 200px;

 width: 500px;

 font-size: 20px;

}

#myTable td,th {

 border: 2px black solid;

 text-align: center;

}

#myTable td:first-child, th {

 background-color: lightgray;

 font-weight: bold;

}

3 0
3 years ago
Other questions:
  • Which of the following statements is false? a. Classes (and their objects) encapsulate, i.e., encase, their attributes and metho
    15·1 answer
  • / List the seven basic internal components found in a computer tower.
    5·2 answers
  • A ____ operating system should be capable of supporting the applications and tools necessary to support Internet operations.
    10·1 answer
  • Refer to the following code segment. You may assume that array arr1 contains elements arr1[0],arr[1],...,arr[N-1], where N = arr
    8·1 answer
  • Calvin needs to design a simple yet professional interface for his users. Which option should he implement?
    9·2 answers
  • Which of the following is a property of TCP?
    8·1 answer
  • What is a best practice when approaching an automation effort?
    6·1 answer
  • What do you think entertainment or gaming platforms will look like in the future?
    9·1 answer
  • The action of entering data into your computer. This can be text typed in a word processing document, keywords entered in a sear
    8·1 answer
  • WHO WANT P O I N T S.................................................
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!