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
What is the name of a button on a website?
zhuklara [117]
May I know which button?
5 0
3 years ago
Write a recursive function that calculates if two binary trees are similar?
ahrayia [7]

Answer:

bool identicaltrees(Node* root1,Node* root2)//function of type boolean true if idenctical false if not.

{

   if(root1==NULL&&root2==NULL)//both trees are null means identical.

   return true;

   if(roo1 && root2)

   {

       if(root1->data==root2->data)//condition for recursive call..

       {

           return (identicaltrees(root1->left,root2->right)&&identicaltrees(root1->right&&root2->right);

       }

   }

   else

   return false;

}

Explanation:

In this function it of type boolean returns true if both the trees are identical return false if not.First we are checking root node of both the trees if both are null then they are identical returning true.

If both root nodes are not null then checking their data.If data is same then recursively traversing on both trees and checking both trees.

else returning false.

5 0
3 years ago
How is your favorite singer and why I will give Brainliest
Lorico [155]

Answer:

Eslabon Armando

His songs hit different ;-;

5 0
2 years ago
Read 2 more answers
In what way are a coffee maker and a dishwasher the same?<br><br>BY THE WAY THIS IS TEENBIZ
weeeeeb [17]
They both need electricity. Both used in the kitchen.
3 0
3 years ago
Read 2 more answers
¿Por que windows es el sistema operativo más utilizado?
Hatshy [7]

Answer:

Explanation:

Hay muchas razones, para empezar Windows ha estado desde el año 1995. Tuvo muchas actualizaciones y Microsoft (la compañia que lo creo) los sigue actualizando y agregando nuevas funciones. Ademas de eso, Windows es compatible con casi todos los programas que salen. Esto le ayuda a que el usario pueda usar todos los programas que quiera y aumenta la popularidad del sistema operativo. Microsoft tambien trae pre-instalado Windows en todas sus computadoras personales que vende.

3 0
3 years ago
Other questions:
  • Most large organizations store data through a strategy called a(n) ________ to promote efficient and safe use of data across the
    11·1 answer
  • Visit the quick access toolbar to find help when looking for certain commands. True False
    15·2 answers
  • Mary can view the thumbnails of her presentation slides when she’s creating the slides which element of the programs interface i
    8·1 answer
  • Credible sites contain __________ information,
    7·2 answers
  • Complete the sentence with the correct response.
    12·1 answer
  • Why did the i have a dream speech happen
    8·1 answer
  • Select all the correct answers
    11·1 answer
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
  • Is iphone battery being draned if plugged into car charger when listening to podcasts
    6·1 answer
  • How do I add a Child to my Brainly account
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!