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, 23.06.2019 13:00
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
question
Computers and Technology, 24.06.2019 03:00
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
Need getting google account back, big issue
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
English, 14.12.2020 17:40
question
English, 14.12.2020 17:40
Questions on the website: 13722361