By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,278 Members | 1,632 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,278 IT Pros & Developers. It's quick & easy.

Generate unique combination of given number od digits

P: 1
i have to generate unique combinations of given number of digits entered by user

eg: N=4 (0,1,2,3)

output should be

0
1
2
3
01
02
03
12
13
23
012
013
023
123
0123
Jan 29 '08 #1
Share this Question
Share on Google+
4 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
i have to generate unique combinations of given number of digits entered by user

eg: N=4 (0,1,2,3)

output should be

0
1
2
3
01
02
03
12
13
23
012
013
023
123
0123
Ok, so you posted your homework to this site, in violation of our Posting Guidelines. We will not provide you the code for this as you are supposed to be learning from this lesson. Although, you can post the code you have tried, enclosed in the proper code tags, and we can assist you in getting it working.

Regards,

MODERATOR
Jan 29 '08 #2

KevinADC
Expert 2.5K+
P: 4,059
those are called permutations. If this is school/class/course work and you are supposed to code your own solution, lets see what you have tried so far. We will be glad to help you if you show some effort, just posting your scripts requirements does not count as effort.
Jan 29 '08 #3

KevinADC
Expert 2.5K+
P: 4,059
He's on a fishing expedition:

http://www.thescripts.com/forum/thread764456.html
Jan 29 '08 #4

numberwhun
Expert Mod 2.5K+
P: 3,503
We here on TSDN do not take kindly to you cross posting your questions in more than one of our forums. That is typically called flooding. When we refused to simply answer your question earlier today, you simply decided to post it in another of our forums. Well, that post has been deleted and you are hereby warned not to go about that route. Code your own school work!!! We will help you work out bugs, but that is it!

Regards,

MODERATOR
Jan 30 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.