Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/100-doors/Red/100-doors.red
Normal file
20
Task/100-doors/Red/100-doors.red
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Red [
|
||||
Purpose: "100 Doors Problem (Perfect Squares)"
|
||||
Author: "Barry Arthur"
|
||||
Date: "07-Oct-2016"
|
||||
]
|
||||
doors: make vector! [char! 8 100]
|
||||
repeat i 100 [change at doors i #"."]
|
||||
|
||||
repeat i 100 [
|
||||
j: i
|
||||
while [j <= 100] [
|
||||
door: at doors j
|
||||
change door either #"O" = first door [#"."] [#"O"]
|
||||
j: j + i
|
||||
]
|
||||
]
|
||||
|
||||
repeat i 10 [
|
||||
print copy/part at doors (i - 1 * 10 + 1) 10
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue