Question: declare an int var to hold a temperature, accept the temperature as input declare a String Variable such as condition and accept input as S
declare an int var to hold a temperature, accept the temperature as input
declare a String Variable such as condition and accept input as S for sunny
use nested if as follow:
if(temperature > 85)
{
output it is hot
use if(condition.Equal("S"))
{
output "sunny"
}
else {output "cloudy"
}
else
{
output temperature is not hot
}
Step by Step Solution
3.59 Rating (163 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
