Two distinct integers, x and y, are randomly chosen from the set {1,2,3,4,5,6,7,8,9,10}. What is the probability that xy is even?
c=0;listforeach(n, d=(2, 3, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 12, 12, 14, 15, 16, 18, 18, 20, 20, 21, 24, 24, 27, 28, 30, 30, 32, 35, 36, 40, 40, 42, 45, 48, 50, 54, 56, 60, 63, 70, 72, 80, 90), m=if(n%2==0, c=(c,n), 0);print c[1, count c-1],">>Total =", count c-1>>Total = 45 such products.
(2, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 16, 18, 18, 20, 20, 24, 24, 28, 30, 30, 32, 36, 40, 40, 42, 48, 50, 54, 56, 60, 70, 72, 80, 90) >>Total = 35 EVEN numbers
Probability = 35 / 45 == 7 / 9