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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
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
Chemistry, 22.07.2019 14:30
question
Chemistry, 22.07.2019 14:30
Questions on the website: 13722360