Jump to content

100 doors: Difference between revisions

100 doors in Asymptote
(100 doors in Asymptote)
Line 1,686:
print "Door $a is ${(doors[a]) ? 'open.': 'closed.'}"
</lang>
 
=={{header|Asymptote}}==
<lang Asymptote>for(int i = 1; i < 100; ++i) {
if (i % i^2 < 11) {
write("Door ", i^2, suffix=none);
write(" is open");
}
}</lang>
 
=={{header|ATS}}==
2,170

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.