by
[Exercise |
API Docs |
Short Course|
Exercises]
|
Use int for the type of each variable.
Task 2
Use an if-statement to test for the temperature being exactly cold. If true, print "cold." If false (use an else-clause), test to see if temp is exactly hot. If so, print "hot".
Remember to use == to compare values, not =
Task 3
Use an if-statement to test for the temperature being in between cold and hot. If it is, print "warm." Else, print "extreme temperature."
The binary or operator is ||
Copyright 1996-2000 jGuru.com. All Rights Reserved.
|
| ||||||||||||