June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
22
Task/Conditional-structures/Red/conditional-structures-3.red
Normal file
22
Task/Conditional-structures/Red/conditional-structures-3.red
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
n: 50
|
||||
case [
|
||||
n < 10 [print "small number"]
|
||||
n < 100 [print "medium number"]
|
||||
n < 1000 [print "large number"]
|
||||
true [print "none of these"]
|
||||
]
|
||||
|
||||
medium number
|
||||
|
||||
;CASE/ALL Prints all that are true
|
||||
n: 50
|
||||
case/all [
|
||||
n < 10 [print "small number"]
|
||||
n < 100 [print "medium number"]
|
||||
n < 1000 [print "large number"]
|
||||
true [print "none of these"]
|
||||
]
|
||||
|
||||
medium number
|
||||
large number
|
||||
none of these
|
||||
Loading…
Add table
Add a link
Reference in a new issue