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
What is the name used for the camera s view from a single position?
CaHeK987 [17]
The answer to your question is a shot


6 0
3 years ago
How did voyager 1 and voyager 2 made outer space exploration and easier
Anna007 [38]
They made it easier because they mapped out some of the galaxy and hazardous things like Astroid belts or rogue planets
5 0
3 years ago
BRAINLIEST Which function will add a name to a list of baseball players in Python?
Tju [1.3M]

Answer: Append()

Explanation:

8 0
3 years ago
Read 2 more answers
Can someone help me answer this, I can’t fail tysm :)
nalin [4]
Don’t know what the answer is but do you, I have the test for that today
5 0
3 years ago
Let PALINDROME_DFA= | M is a DFA, and for all s ∈ L(M), s is a palindrome}. Show that PALINDROME_DFA ∈ P by providing an algorit
denis-greek [22]

Answer:

Which sentence best matches the context of the word reticent as it is used in the following example?

We could talk about anything for hours. However, the moment I brought up dating, he was extremely reticent about his personal life.

Explanation:

Which sentence best matches the context of the word reticent as it is used in the following example?

We could talk about anything for hours. However, the moment I brought up dating, he was extremely reticent about his personal life.

8 0
3 years ago
Other questions:
  • Use search engines and websites to research the following WAN technologies to complete the table below:
    7·2 answers
  • Is Digital technology always better or should we champion or even return to innovative of analog machines and experiences? Apex
    13·1 answer
  • Binary is a sequence of 0s and 1s such as 1001101 which can be used to code information. To break a code, you need to find how m
    14·1 answer
  • Databases can have various objects some of which are tables, queries, forms or views, and reports objects. Each of these has fie
    14·1 answer
  • Consider the following C code fragment:
    10·1 answer
  • WHAT SO THESE THINGS THAT I'VE HIGHLIGHTED MEAN IN MICROSOFT WORD?
    12·1 answer
  • Using 2 bytes, how many different characters can Unicode represent?
    14·1 answer
  • Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containing float values. We want to
    9·1 answer
  • What is the value of x after running this code?
    13·2 answers
  • How to fix a blue screen
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!