We help IT Professionals succeed at work.

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

rjef
rjef asked
on
272 Views
Last Modified: 2017-03-31
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
Comment
Watch Question

Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
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?

Author

Commented:
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?
Social distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
thanks
Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
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

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions