I have an array @ary = [1, 3, 4, 2, 7, 8, 9] and I want to know how many possibilities of combination can add equal to 9.
@ary = [1, 3, 4, 2, 7, 8, 9]
I have four possibilities can add equal to 9 [1,8]、[2, 3, 4]、[9]、[2, 7],how can I print it out?
[1,8]
[2, 3, 4]
[9]
[2, 7]
Aucun commentaire:
Enregistrer un commentaire