![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 28.11.2020 05:00, RealGibbon857
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");
}
}
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:00, paigesyring
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 11:00, jolleyrancher78
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 00:50, anthonycraig0205
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 13:20, sanaiajohnson56
In the insert table dialog box, you select the checkbox to create the first row as the header of the table.
Answers: 3
Do you know the correct answer?
The template code provided is intended to take two inputs, x and y, from the user and print "pass" i...
Questions in other subjects:
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 16.04.2021 07:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2021 07:00
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2021 07:00
![Konu](/tpl/images/cats/en.png)
English, 16.04.2021 07:00
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/fizika.png)
Physics, 16.04.2021 07:00
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 16.04.2021 07:00