Avatar of rjef
rjef
Flag for United States of America asked on

all the possible sequences for numbers 1,2,3,4,5,6,7,8,9,10 in groups of 5.

so I need to write a VB6 program that will generate all the possible sequences for numbers 1-10 in groups of 5.  
below is a starting sequence but not sure how to do it in a program.

1 2 3 4 5 61 2 3 4 5 10
1 2 3 4 6 7
1 2 3 4 5 7
1 2 3 4 5 8
1 2 3 4 5 9

1 2 3 4 6 8
1 2 3 4 6 9
1 2 3 4 6 10
1 2 3 4 7 8
1 2 3 4 7 9
1 2 3 4 7 10

etc
Visual Basic Classic* vb6

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Martin Liss

If you want combinations where for example 12345 would be considered the same as 13245 then you'd get about 240 results. If you want permutations where for example 12345 would be not considered the same as 13245 then you'd get about 30,000 results. Which do you want?
rjef

ASKER
where 12345 is the same as 13245.  (combinations)
would just make 5 loops from 1 to 10 and check for duplicates and repeats or is there a function?
ASKER CERTIFIED SOLUTION
Martin Liss

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
rjef

ASKER
thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Martin Liss

You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2016