Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- i = 0.0; c = 10000000
- (0..c).each do |i2| i += 1 if rand**2 + rand**2 <= 1 end
- puts i*4 / c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement