[ create a new paste ] login | about

Link: http://codepad.org/0DUTIkB1    [ raw code | output | fork ]

Ruby, pasted on Jul 9:
1
2
3
4
5
6
a = 0
b = 0
1000.times do
    if (rand(2) > 0) then a+=1 else b+=1 end
end
puts "a = #{a}, b = #{b}"


Output:
1
a = 509, b = 491


Create a new paste based on this one


Comments: