Welcome to the Treehouse Community
Looking to learn something new?
Aaron Coursolle18,014 Points
Resolved: In last code challenge: An error in logic.
Hi, I noticed a small mistake in the code challenge question (it doesn't affect validating if the code is correct or not; it just might cause confusion). According to the chart, the code should print "Just right" instead of "Too cold!"
Original Challenge Wording: The following table describes my room temperature preferences. Print the message from the table when a user enters a number in the corresponding range. For example, if temperature is 21 the code should print "Too cold!" to the screen.
Temperature (deg C) -- Message; Less than 21 deg -- Too cold!; 21 deg to 22 deg -- Just right.; Greater than 22 deg -- Too hot!
Tomasz NecekCourses Plus Student 7,028 Points
Why I couldn't put : else if(temperature == 21||22) ?? There was a problem with " || " . Thanks.