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]
3 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]3 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
In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:
abruzzese [7]

Answer:

The corrected code is as follows:

import java.util.Scanner;

public class U2_L4_Activity_Two{

public static void main(String[] args){

Scanner scan = new Scanner(System.in);

String str1 = scan.nextLine();

String str2 = str1;

str1 = str1.toUpperCase();

System.out.println(str1);

System.out.println(str2);

}

}

Explanation:

This corrects the scanner object

Scanner scan = new Scanner(System.in);

This line is correct

String str1 = scan.nextLine();

This copies str1 to str2

String str2 = str1;

This converts str1 to upper case

str1 = str1.toUpperCase();

This prints str1

System.out.println(str1);

This prints str2

System.out.println(str2);

8 0
3 years ago
In one week, your company received the following quantities of e-mail messages. Monday 240 Tuesday 315 Wednesday 290 Thursday 18
Vika [28.1K]

Answer:

280

Explanation:

Average = (240 + 315 + 290 + 180 + 375) ÷ 5

= 1400 ÷ 5

= 280

Cheers

3 0
3 years ago
Value appears on the left hand side of cell <br> true or false
11111nata11111 [884]

Answer:

True

Your welcome

.........

4 0
3 years ago
Read 2 more answers
In cell B12, enter a formula to calculate the amount budgeted for Mileage to/from Airport. The amount is based on the Mileage Ra
sashaice [31]

Answer:

X=mileage+y

Explanation:

7 0
3 years ago
Check out this app! It's millions of students helping each other get through their schoolwork. https://brainly.app.link/qpzV02Ma
MrRa [10]

Answer:

Tamam hocam o zaman....

8 0
2 years ago
Other questions:
  • Which payment type is best if you are trying to stick to a budget?
    10·2 answers
  • Blank spaces or unseen control characters in a data file are referred to as
    5·2 answers
  • A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
    9·1 answer
  • Certain files, such as the ____ and Security log in Windows, might lose essential network activity records if power is terminate
    9·1 answer
  • What type of display allows the user to access a large amount of vocabulary in one device, uses spelling to convey the message,
    10·1 answer
  • Explain the Decision making statement​
    15·1 answer
  • How to deactivate the brainly account?​
    13·1 answer
  • What method of thermal energy is at work when heat lamps are used to warm up baby chickens?
    11·2 answers
  • What is the initial step to exploring solutions to a problem?
    15·2 answers
  • 9
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!