Connecting Tech Pros Worldwide Forums | Help | Site Map

Listing All Permutations Of A Set

Newbie
 
Join Date: Nov 2007
Posts: 2
#1: Nov 28 '07
hello every one:
i want to write a program in which a set is entered.two numbers of the set is also entered.it will print all the combinations and permutations on the out put screen.
E-G
if i have a set {1,2,3,4,5}
if i select permutation for two numbers than it will print
e-g
1 2
2 1
1 3
3 1
1 4
4 1
1 5
5 1
2 3
3 2
2 4.........
i want the code of this program in simple C language..
THANKS TO ALL OF U.

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Nov 28 '07

re: Listing All Permutations Of A Set


Why did you ask your question in a Java Forum then?

kind regards,

Jos
Reply