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
Is this statement true or false?
dybincka [34]

Answer:

true

Explanation:

I used microsoft paint and found out that it will

3 0
3 years ago
What happens in the development phase of the software development life cycle?
Olin [163]

Answer: Planning the solution, look and feel of the software interface

5 0
2 years ago
Pat creates a table in a spread sheet
Anna11 [10]

Answer:

Explanation:

Details?

7 0
4 years ago
Select the education or qualification that is best demonstrated in each example Freda interviews a famous local athlete on a tel
Lilit [14]

Answer:

communication skills

bachelor's degree

planning and organizational skills

research skilss

8 0
4 years ago
Which element of color theory helps designers choose color schemes that create an appealing visual?
WITCHER [35]

Answer of this question is

C. Design

4 0
3 years ago
Read 2 more answers
Other questions:
  • What's does the Mutual Reward Theory state?
    10·1 answer
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • For this lab, youhave to write a programnamedseriesFunction.cthat prompts user to enter two values, x and n. Then it would use a
    11·1 answer
  • What technology will examine the current state of a network device before allowing it can to connect to the network and force an
    7·1 answer
  • the list of available fonts in the fonts gallery may differ, depending on what fonts you have installed and the type of printer
    14·1 answer
  • To distribute one or more presentations for use on another computer, which of the following features should you use?
    13·1 answer
  • Rey is recording the dialogues and sound effects separately in the studio, as he is not happy with the sound quality recorded on
    9·1 answer
  • Create a python code with 5 circles, 5 polygons, 5 line commands, 2 for loops, and 1 global variable
    12·1 answer
  • What is the purpose of exploring data?
    6·2 answers
  • MOA115 Medical Records and Insurance
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!