Random demo
Random hardware
Random game
  • Entry name:
    100 doors
  • Category:
    Other
  • Publisher/Developer:
    Rosetta Code
  • Year:
    2021
  • Code:
    amarok
  • Programming language:
    Action!
100 doors
Listing 1
DEFINE COUNT="100"

PROC Main()
  BYTE ARRAY doors(COUNT+1)
  BYTE door,pass

  FOR door=1 TO COUNT
  DO
    doors(door)=0
  OD
  
  PrintE("Following doors are open:")
  FOR pass=1 TO COUNT
  DO
    FOR door=pass TO COUNT STEP pass
    DO
      doors(door)==!$FF
    OD
    IF doors(pass)=$FF THEN
      PrintB(pass) Put(32)
    FI
  OD
RETURN  

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!