03-06-2023, 12:04 PM
Here's my dartboard solution
I was going to add graphics of darts being thrown at the dartboard but I can procrastinate well enough without going to those extremes!
And, yes, I know it's a rubbish solution but it's kinda fun
Code: (Select All)
RANDOMIZE TIMER
CONST N& = 10000000
FOR i& = 1 TO N&
x! = RND * 2 - 1
y! = RND * 2 - 1
h& = h& - (x! * x! + y! * y! < 1)
NEXT i&
PRINT h& / N& * 4
I was going to add graphics of darts being thrown at the dartboard but I can procrastinate well enough without going to those extremes!
And, yes, I know it's a rubbish solution but it's kinda fun
RokCoder - dabbling in QB64pe for fun