RosettaCodeData/Task/100-doors/FutureBasic/100-doors.basic

15 lines
267 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
include "NSLog.incl"
NSInteger door, square = 1, increment = 3
for door = 1 to 100
if ( door == square )
NSLog( @"Door %ld is open.", door )
square += increment : increment += 2
else
NSLog( @"Door %ld is closed.", door )
end if
next
HandleEvents