Question: java Write a program to ask user to enter the average temperatures and humidity levels for two cities (city 1 and city 2) and print
Write a program to ask user to enter the average temperatures and humidity levels for two cities (city 1 and city 2) and print message(s) according to the following. The program first compares the temperatures as follows: If city 1's temperature is greater than that of city 2, it prints that city 1 has higher temperature. If city 1's temperature equals to that of city 2, it prints that the two cities hav- the temperature. If the temperature of city 1 is less than that of city 2, it prints that city 2 has higher temperature. The program then compares the humidity levels as follows: If the humidity level of the first city is greater than that of the second city, it prints that city 1 is more humid. If the humidity level of the first city equals to that of the second city, it prints that the two cities have the same humidity. If the humidity level first city is less than that of the second city, it prints that city 2 is more humid. You can use repl.it to write, compile and execute your program. When you are done, copy and paste your program to the box below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
