Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating multiple arrays out of one array

Status
Not open for further replies.

priyanka12

Programmer
Joined
Jul 26, 2006
Messages
1
Location
US
Hi,

Can any one tell me if there is some way of doing the following ?

I have a vector num = {5,6,8,7,3}

From this vector, I need to create all those unique vectors that can be formed from vector num.

For instance,
{5}
{6}
{7}
..
..
{5,6}
{5,8}
..
..
{8,7}
{7,8}
..
..
{5,6,7}
{7,6,5}
..
..
{8,7,6,5,3}
{6,7,3,5,8}
..
.. and so on.

Thank you in advance,

Priyanka
 
hmm... has the strong odor of homework...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top