I have the following records containing 5 numbers each. They are as follows :-

sr1 12, 23,34,35,36
sr2 14,18,25,31,37
sr3 7,11,19,26,42
sr4 2,17,29,32,40
sr5 5,9,16,28,33
sr6 15,21,31,39,41

Now I want to generate new records of 5 each numbers from the above numbers. New record should not contain more than 2 numbers from sr1,sr2,sr3,sr4,sr5,sr6

please guide me

thanks in advance
cliffs

We will not do your homework for you. You must show that you are really trying to solve this problem on your own, that you have code to show for, and that you are stumped on a specific problem. We can help you solve specific problems or explaining certain things that you are having trouble with. What we don't do is serve you working code on a silver platter, because that won't help you to learn anything.