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
Feliz [49]
4 years ago
9

int temp; temp = 180; if ( temp > 90 ) { System.out.println( "This porridge is too hot." ); // cool down temp = temp – ( temp

> 150 ? 100 : 20 ); } // end if else { if ( temp < 70 ) { System.out.println("This porridge is too cold."); // warm up temp = temp + (temp < 50 ? 30 : 20); } // end if } // end else if ( temp == 80 ) System.out.println( "This porridge is just right!" );

Computers and Technology
1 answer:
STALIN [3.7K]4 years ago
3 0

Answer:

The combined output will be option D which is

This porridge is too hot.

This porridge is just right!

Explanation:

As the complete question is not the given the complete question is found online and is attached herewith.

Now from the given attached code

As the temperature value is 180 which is more than 90 so the first loop is true and the first print out is

This porridge is too hot.

Now the temperature is cooled down using the formula such that the temperature reduced 100 degrees in the intervals of 20 now the temperature becomes 80. As it is greater than 70, thus the second if loop is not executed.

As the temperature is 80 this the next print out will be as

This porridge is just right!

So the combined output will be option D which is

This porridge is too hot.

This porridge is just right!

You might be interested in
Which object waits for and responds toan event from a GUI component?
irakobra [83]

Answer:

The answer is action eventlistener

Explanation:

It is an event handler and it is easy to implement.In java we call them even listeners it is function or a sub routine or a procedure that waits for an event to occur and respond to an event from a GUI component.

8 0
3 years ago
Hey can you help we with this thanks
dimulka [17.4K]
Hey, it's easy, come on!
6 0
3 years ago
Charles Montesquieu believed that the
kakasveta [241]

Answer:

A. Make Laws

Explanation:

Montesquieu believed the ways to go about limiting the power of a monarch would be to split up power among 3 groups, Judicial, Legislative and Executive. The American Presidential system and Constitution used Montesquieu's writings as a foundation for their principles.

  1. Judicial Interprets laws
  2. Legislative Makes laws
  3. Executive Enforces Law

6 0
3 years ago
Read 2 more answers
You review a design written by somebody else for an application and you find these: - an interface Shape with a method draw() -
laila [671]

This is the Composite pattern, one of the "Gang-of-Four" design patterns (check out their book!).

6 0
3 years ago
Higher-speed Ethernet technologies use an electronic device known as a Hub rather than a switch True/False
Ivenika [448]
This should be false
4 0
3 years ago
Other questions:
  • Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, pr
    5·2 answers
  • Obtain the 10’s complement of the following six-digit decimal numbers:<br><br> 123900<br><br> 980657
    10·1 answer
  • The system tray contains _____.
    7·2 answers
  • What following functions does browser perform
    5·1 answer
  • An option button is<br>​
    14·2 answers
  • Which term describes the distance from one point on a wave to the same point on the next wave?
    13·2 answers
  • Any computer expert to help me answer this question plz am giving brainliest
    11·1 answer
  • TRUE OR FALSE
    14·1 answer
  • HELP ME PLEASE
    8·1 answer
  • List and describe with details at least three approaches to selecting processes from priority-based multi-level queues.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!