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
Does Rational database software lets you link multiple tables? Yes or no
Julli [10]

Answer:

yes

Explanation:

i did some research but don't take my word for it and let me know if it wrong

4 0
2 years ago
______A computer program may only be constructed in a high level language. (T/F)
NeTakaya

Answer:

False.

Explanation:

A computer program can not only constructed in a high level language but also in low level language such as assembly language used for microprocessor for ex-8085 microprocessor,8086 microprocessor ,ARM assembly language and there are many more.

High level languages are programmer friendly they are easily understood by the programmers because they uses english words while low level languages are difficult because they uses binary language 0's or 1's.

Hence the answer to this question is False.

5 0
4 years ago
Can you explain the GB part. The gigibiyte part, what does that mean when usung wifi off of a hotspot?
REY [17]
From how I interpret it, it means that you can use X amount of megabytes or gigabytes within the billing cycle. For example, if you went with $100/2 months for 10GB of data, you would pay $100 every 2 months, and within those 2 months you would be able to use 10 gigabytes of data. It looks like the average smartphone user uses about 3GB of data per month, but you'll have to gauge it based on what you normally use.
7 0
3 years ago
State the Limitations of the first generation of computers​
Ivanshal [37]

Answer:

The limitations of the first generation of computer are:-

•The operating speed was very low.

•Power consumption was very high.

•They required large space for installation.

<h2>Hope it helps you.</h2>
3 0
3 years ago
Which is a energy that releases a chemical reaction?
uysha [10]
The electric energy is not one
8 0
4 years ago
Other questions:
  • _ is a model of computing in which computer processing, storage, software, and other services are provided as a shared pool of v
    10·1 answer
  • Luis is cloud-based( microsoft bot framework). true false
    13·2 answers
  • _____ refers to unsolicited commercial emails, usually sent to a large number of people with little regard to the users interest
    14·1 answer
  • I have to make a online presentation, which program is the best
    10·2 answers
  • Your friend Rebecca called because she is working on a budget and needs help with the AutoSum feature. She thinks AutoSum will b
    8·1 answer
  • The effects of activating the complement system include all of the following except
    14·1 answer
  • How can migrating to an enterprise platform solution help a business improve employee productivity?
    12·1 answer
  • What is radial gradient in Flash CS3
    6·1 answer
  • To obtain your class E learner license, youll need too _
    9·1 answer
  • Are they going to make season two of Midori Days
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!