quante probabilita' hanno Peter e Colin che gli esca lo stesso numero?# Peter has a four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4.
# Colin has a six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6.
[ot]
Ruby:
Codice:
z = 0 and 4.times{|x| 6.times{|y| z+=1 }} and z=z/2