subject

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 following 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");
}
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
Would a ps4 wired controller work on an xbox one
Answers: 1
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
You know the right answer?
The template code provided is intended to take two inputs, x and y, from the user and print "pass" i...
Questions
question
Mathematics, 15.04.2021 05:00
question
SAT, 15.04.2021 05:00
question
Mathematics, 15.04.2021 05:00
question
History, 15.04.2021 05:00
question
Physics, 15.04.2021 05:00
question
Mathematics, 15.04.2021 05:00
question
Mathematics, 15.04.2021 05:00
question
Mathematics, 15.04.2021 05:00
Questions on the website: 13722367