Constrained random points on a circle: Difference between revisions

m (→‎version 0, without aspect adjustment: changed wording in the REXX output section header.)
Line 1,833:
 
At this point you would be justified in concluding that we are completely mad. <tt>:-)</tt>
 
=={{header|Phix}}==
<lang Phix>sequence screen = repeat(repeat(' ',31),31)
integer x, y, count = 0
atom r
while 1 do
x = rand(31)
y = rand(31)
r = sqrt(power(x-16,2)+power(y-16,2))
if r>=10 and r<=15 then
screen[x][y] = 'x'
count += 1
if count>=100 then exit end if
end if
end while
puts(1,join(screen,"\n"))</lang>
{{out}}
<pre>
x xx
x x x
x x x x x
x x x x
x x xx
x x x x
xx xx x
x
x
x
x x
x
x x x
xx xxxx
x x
x x
x
x x x
x
x x
xx x x x
x x
x x x
x x x x
x x xx x
x x x xx xx
xx x
x xx
x x x
</pre>
 
=={{header|PicoLisp}}==
7,820

edits