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
sergey [27]
3 years ago
11

What is wrong, logically, with the following code? if (x > 10) System.out.println("Large"); else if (x > 6 && x &l

t;= 10) System.out.println("Medium"); else if (x > 3 && x <= 6) System.out.println("Small"); else System.out.println("Very small");
Computers and Technology
1 answer:
Alex73 [517]3 years ago
8 0

Answer:

The above code will hold the second condition with && operator, like "x<=6" or"x<=10" condition in the else if statement which is of no use.

Explanation:

  • The above code holds a condition-based statement by the help of if-else statement where--
  • The first if-condition will states true when the value of x will be greater than 10, So the if-else condition will be tested for that value of x which is less than or equal to 10.
  • So there is no needs to justify the " x <= 10" for else if statement and " x <= 6" for the second else if statement because the second else if statement will be tasted when the value of x will be less than or equal to 6.
You might be interested in
an engineer is writing a web application that requires some user input. the engineer has put a submit button on their page and n
Setler [38]

In order to make the program recognize the clicking of a button, the engineer should add an event listener to the JavaScript code.

An event is considered to be a vital part of JavaScript because a web page responds according to the event that occurred. Some events are generated by APIs and some are user-generated events. For example, clicking or moving the mouse button and pressing a key on the keyboard are user generated events.

In order to handle the user-generated events in JavaScript,  an event listener is used. An event listener is a function or procedure in a JavaScript program that waits for an event to occur; such as pressing a key on the keyboard or clicking the button. Therefore based on the scenario given in the question statement, the engineer should use an event listener to his JavaScript code so that the code can recognize the click of the button.

You can learnmore about event at

brainly.com/question/20169706

#SPJ4

7 0
10 months ago
If a company's IS-related programs are not developed in-house, then the development group of the IS department will be staffed p
EastWind [94]

Answer:Systems analysts

Explanation: System analyst is referred as the person in an organization for resolving the issue related program and information technologies. The person basically design the solution by analyzing the problem accordingly.

Information system of company has any separate department for handling the problems related with the IS-related programs. These problem usually lies under the department of the system analyst. They work on the problem solving, improvement and improvisation, training etc.

3 0
3 years ago
What is presentation
Gelneren [198K]
To present something infront of a crowd
5 0
2 years ago
Read 2 more answers
Select the best answer to the following question.
Fittoniya [83]

Answer:

I think its called "cloud computing"

8 0
2 years ago
Anisha was learning ‘for’ and ‘while’ loop. Help her understand why for and while loops are called entry controlled loops.
Andrew [12]

Entry controlled loop - <u>The loop which has a condition check at the entrance of the loop, the loop executes only and only if the condition is satisfied is called as entry control loop.</u>

So, for and while loops are its examples.

6 0
2 years ago
Other questions:
  • When purchasing a(n) ________ computer, having cellular as well as wifi can be important?
    9·1 answer
  • . What may happen if a large number of computer users are attempting to access a Web site at the same
    10·2 answers
  • A parameter is a numerical measure that describes a characteristic of a sample. Choose One • 4 points True False
    6·1 answer
  • Line spacing refers to the amount of space between each line in a paragraph. A. True B. False
    14·2 answers
  • Question 2 (5 points)
    12·1 answer
  • Complete the following table.
    6·1 answer
  • In numpy to append two arreys vertically the function __ is used
    12·2 answers
  • What are the characteristics of computer. Explain any one​
    15·2 answers
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
  • You would like to see only the last 15 lines of /home/user/log file on your linux machine. Which command line interface (cli) co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!