Write a Java program to accept temperature of the day from user and print if it is a hot weather or cool weather on the following conditions.. Temp<=28 : cool weather.. Temp>28 :hot weather
please write the whole program.. I will mark u as the brainliest
Answers
Answer:
svaggsefcdvdjjdhdbevbzbdklsbv my vec
Explanation:
sbbsgeve bshshhdhsnenjwhegvsv☹️☹️☹️☹️❤️❤️♥️❤️❤️♥️❤️♥️❤️♥️☹️❤️☹️☹️☹️☹️☹️☹️☹️☹️☹️☹️
Answer:
if (temperature <= 32){
if (weatherCondition == 4){
freezingSnowing();
}
else if (weatherCondition == 3){
freezingCloudy();
}
else if (weatherCondition == 2){
freezingRain();
}
else {
freezingSunny();
}
there should be one more closing brace after else, only then you will be able to check for the other conditions
if (temperature <= 32){
if (weatherCondition == 4){
freezingSnowing();
}
else if (weatherCondition == 3){
freezingCloudy();
}
else if (weatherCondition == 2){
freezingRain();
}
else {
freezingSunny();
}
}
if ((temperature >= 33) && (temperature <= 60)){
if (weatherCondition == 4){
warmSnowing();
}
else if (weatherCondition == 3){
warmCloudy();
}
else if (weatherCondition == 2){
warmRain();
}
else {
warmSunny();
}
Explanation:
Hope, this will help you.