Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfset aDoors = arrayNew(1)/>
- <cfloop from=1 to=100 index="i">
- <cfloop from=1 to=100 index="y">
- <cfif arraylen(aDoors) LT y OR !len(aDoors[y])>
- <cfset aDoors[y] = 'closed'/>
- </cfif>
- <cfif y mod i eq 0>
- <cfif aDoors[y] eq 'closed'>
- <cfset aDoors[y] = 'open'/>
- <cfelse>
- <cfset aDoors[y] = 'closed'/>
- </cfif>
- </cfif>
- </cfloop>
- </cfloop>
- <cfdump var="#aDoors#"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement