• #1061
    Refresh Thread
    By: fsck This person is cool! x Show Full Post
    Reply
    programming dudez:

    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
    toggle
    programming dudez: i have 5 letters, a,b,c,d,e. i need to output all the possible 3 letter, non-repeat... : fsckThis person is cool!

    Thread Truncated. Click to see all 5 replies.

    • toggle
      three nested for loops : electrolyThis person is cool!
      • wont two be enough ? Since he needs two's combinations ? : r3ckless
    • do it like counting in binary. : radulaThis person is cool!
    • 3 nested for loops. Make them all for posX = a to e. If, in the inner-most loop, pos2 != pos1 && po... : Audhuml4This person is cool!