[ create a new paste ] login | about

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

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


Output:
1
a = 40, b = 60


Create a new paste based on this one


Comments: