Respuesta :
Answer:
public class num8 {
public static void main(String[] args) {
System.out.println("Average Temperature in New York is 85 degrees fahrenheit");
System.out.println("Average Temperature in Denver is 88 degrees fahrenheit");
System.out.println("Average Temperature in Phoenix is 106 degrees fahrenheit");
// Calculating the new average Temperatures
System.out.println("The New Average Temperature in New York " +
"is "+ ((0.02*85)+85 )+ " degrees fahrenheit");
System.out.println("The New Average Temperature in Denver " +
"is " +((0.02*88)+88 )+ " degrees fahrenheit");
System.out.println("The New Average Temperature in Phoenix " +
"is "+((0.02*106)+106 )+ " degrees fahrenheit");
}
}
Explanation:
- Using Java first display the previous average temperatures for the three cities as given in the question
- Then calculates the new average temperature by multiplying by 0.02, because of a 2 percent increase in the average temperature
- Display the new temperature using the System.out,println