How to create all the possibilities of a scheme with a loop?

1

For example, have A, B, and C trade places with each other, and then define how many and how many exchanges. ABC, ACB, BAC, BCA, CAB, CBA, etc. I want to do this with the for loop and I prefer Javascript, but it is not necessary to be in it, it can be in PHP, C ++, Java, etc.

NOTE: What I want to create is an RGB frame. That is to have to have 3 variables, from 0 to 255.

    
asked by anonymous 16.07.2015 / 16:30

0 answers