Constrained random points on a circle: Difference between revisions

Content added Content deleted
(Constrained random points on a circle en Yabasic)
(Constrained random points on a circle en BASIC256)
Line 363: Line 363:


=={{header|BASIC}}==
=={{header|BASIC}}==

==={{header|BASIC256}}===
{{trans|PureBasic}}
<lang freebasic>graphsize 31, 31

for i = 1 to 100
do
x = int(rand * 30) - 15
y = int(rand * 30) - 15
r = sqr(x*x + y*y)
until 10 <= r and r <= 15
color rgb(255, 0, 0)
plot(x+15, y+15)
next i
end</lang>


==={{header|BBC BASIC}}===
==={{header|BBC BASIC}}===