#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Less than / Greater than / Between

edited July 2012
```Table: 16
&#91;|G2|G3&#93;&
&#91;when&#93;{\$age}&lt;10&#91;do&#93;V &#91;end&#93;&
&#91;when&#93;{\$age}&lt;11.6 &gt;10&#91;do&#93;IV &#91;end&#93;&
&#91;when&#93;{\$age}&gt;11.6&lt;12.6&#91;do&#93;III &#91;end&#93;&
&#91;when&#93;{\$age}&gt;12.6&#91;do&#93;D &#91;end&#93;&
(1.00)
```
In the above code I'm trying to do an age less than 10 as V; between 10 and 11.6 as IV; and between 11.6 and 12.6 as III. Sadly though, whenever I get an age lower than 10 I get the V, the IV, and the III.

Is there a way to do that using the when statements or is there another way of doing it.

• I believe I have sorted the problem by using the else. I have included the new code below. If anyone has any other way of doing it I would be interested in seeing them.

Thanks.
```Table: 16
&#91;|G2|G3&#93;&
&#91;when&#93;{\$age}&lt;10&#91;do&#93;V &#91;else&#93;&
&#91;when&#93;{\$age}&lt;11.6&#91;do&#93;IV &#91;else&#93;&
&#91;when&#93;{\$age}&lt;12.6&#91;do&#93;III &#91;else&#93;D &
&#91;end&#93;&#91;end&#93;&#91;end&#93;&
(1.00)
```