Combinations, lotto, 6/49

Hello folks

Haven't heard from you for days...:-) Well, is my fault, but now I'm back.

Of course, another issue. Been some time I finished school, so I completly forgot (if ever attended) the combinations (math) lesson, you know, you are given 8 buddyes, you have to make X teams choosing two of them. How many combinations (teams) could you have? The same applyes to 6/49 (which is my interest right now, a friend of mine called me to make him an applications that would do the listing for him).

If anyone has encountered and solved this somehow, please let me know. I don't even know where to start from

Regards

Robert

Do you think this is not the place?

Do you think this is not the place for this? I need something in C+, and you are right, I don't need to list ALL the combinations, there should be, let's say, 6 numbers and 5 chosen, or 7 with 5 chosen.

Well, no second thoughts?

Robert