Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Loop all pairs

Name: Anonymous 2012-02-05 12:30

Let's say I have this array:

{a, b, c, d, e}

How can I look through all the possible pairs?

a, b
a, c
a, d
a, e
b, c
b, d
b, e
c, d
c, e
d, e

Fictional language syntax please.

Name: Anonymous 2012-02-05 22:36

>>26
No dumb shit, I wanted to know whether or not OP was asking for combinations or permutations, because I didn't read his list of required outputs. However after reading the list it is obvious that he is looking for all combinations with two indices.

You seem to be confused. In a permutation order matters, in a combination order does not. Try and think before speaking you mental midget.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List