Show Full Post
i have 5 letters, a,b,c,d,e. i need to output all the possible 3 letter, non-repeating combinations. letter position is also important, e.g. abc and cba is considered as two combinations. what's the best way to do it in C?
Nov 11, 2005 1:30am PST
programming dudez: i have 5 letters, a,b,c,d,e. i need to output all the possible 3 letter, non-repeat...
Thread Truncated. Click to see all
three nested for loops
wont two be enough ? Since he needs two's combinations ?
do it like counting in binary.
3 nested for loops. Make them all for posX = a to e. If, in the inner-most loop, pos2 != pos1 && po...