[ create a new paste ] login | about

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

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


Output:
1
a = 6, b = 4


Create a new paste based on this one


Comments: