Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cfset aDoors = arrayNew(1)/>
  2. <cfloop from=1 to=100 index="i">
  3.     <cfloop from=1 to=100 index="y">
  4.         <cfif arraylen(aDoors) LT y OR !len(aDoors[y])>
  5.             <cfset aDoors[y] = 'closed'/>
  6.         </cfif>
  7.         <cfif y mod i eq 0>
  8.             <cfif aDoors[y] eq 'closed'>
  9.                 <cfset aDoors[y] = 'open'/>
  10.                 <cfelse>
  11.                 <cfset aDoors[y] = 'closed'/>
  12.             </cfif>
  13.         </cfif>
  14.     </cfloop>
  15. </cfloop>
  16.  
  17. <cfdump var="#aDoors#"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement