- #1
Travian
- 64
- 0
Homework Statement
I have a question regarding IF statements.
Here's an algorithm:
put on hat ;
IF (weather is sunny)
Put on sunglasses ;
ENDIF
Put on shoes ;
What items of clothing will be put on a) when it is raining and b) when it is sunny?
Homework Equations
The Attempt at a Solution
a) hat, shoes.
b) sunglasses, hat, shoes.
What i want to know is:
if its raining then obviously i put on a hat and shoes. Now if it's sunny (like indicated in the IF statement), then not only i wear sunglasses, but hat and shoes as well?