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
4. The programmer who focuses on implementing the game mechanics, rules, and other elements essential for gameplay is the
Snezhnost [94]
The answer would be gameplay programmer, as they are responsible for the implementation of gameplay  mechanics.
7 0
3 years ago
Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
Zielflug [23.3K]

Answer:

The program in Python is as follows:

string = input("String: ")

chr = input("Character: ")[0]

total_count = string.count(chr)

print(total_count,end=" ")

if total_count > 1:

   print(chr+"'s")

else:

   print(chr)

Explanation:

This gets the string from the user

string = input("String: ")

This gets the character from the user

chr = input("Character: ")[0]

This counts the occurrence of the character in the string

total_count = string.count(chr)

This prints the total count of characters

print(total_count,end=" ")

If the count is greater than 1

if total_count > 1:

Then it prints a plural form

   print(chr+"'s")

If otherwise

else:

Then it prints a singular form

   print(chr)

7 0
3 years ago
What your computer can do to you?
hjlf

Answer:

it can blind you because too much light in ur face is bad

Explanation:

6 0
3 years ago
Read 2 more answers
In which situation is the person applying critical thinking skills?
Mama L [17]

I would say C is correct

7 0
3 years ago
Read 2 more answers
What does XML do with a data wrapped in the tags?
Arlecino [84]

Answer:

Especificación para diseñar lenguajes de marcado, que permite definir etiquetas personalizadas para descripción y organización de datos. ¿Para que sirve XML? Representar información estructurada en la web (todos documentos), de modo ... Las etiquetas se definen para crear los documentos, no tienen un significado

Explanation:

5 0
4 years ago
Other questions:
  • Each peripheral device has its own software, called a(n) ____, which contains the detailed instructions required to start that d
    6·1 answer
  • In nutanix command-line interface (ncli) commands, each entity has a unique set of actions, but a common action across all entit
    15·1 answer
  • If needed, you can pull over on the shoulder of the freeway to take a break if you are tired. true or false (drivers ed) need as
    11·1 answer
  • Do you think that people have a “right” to remain anonymous online? Why or why not?
    6·1 answer
  • Which network protocol is used to route IP addresses?<br>A. TCP<br>B. UDP<br>C. IP<br>D. ICMP
    15·1 answer
  • Select the true statement from the choices below. Group of answer choices Invalid code may cause browsers to render the pages sl
    11·1 answer
  • . Why use a sensitivity analysis?
    14·1 answer
  • How long does it take to go 80 miles if you are going 80 mph?
    8·2 answers
  • How to install an older version of prettier on yarn
    9·1 answer
  • A Chain of dry-cleaning outlets wants to improve its operations by using data from devices at individual locations to make real-
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!