example:
2 choose 1
Result 1
2
5 selected 2
Result 1 $ 2
1 $ 3
1 $ 4
1 $ 5
2 $ 3
2 $ 4
2 $ 5
3 $ 4
3 $ 5
4 $ 5
Realize BCB3
Void __fastcall tform1 :: button1click (Tobject * sender) {temp = ""; count = 0; for (int i = 0; i <100; i ) bt [i] = ""; memo1-> lines-> clean Int x, y; x = edit1-> text.Tointdef (1); y = edit2-> text.TointDef (1); fun (x, y); memo1-> lines-> add ("total public" Ansistring (count) "record"); j = 0;} // -------------------------------- ------------------------------------------ ANSISTRING __FASTCALL TFORM1 :: Fun INT A, INT b) {IF (a == b) {for (int i = b; i> = 1; i -) TEMP = Temp "$" (ANSISTRING) i; memo1-> lines-> Add (Temp); Temp = ""; count ; return ";} else if (b == 0) {MEMO1-> lines-> add (temp); temp ="; count ; return ";} Else {TEMP = FUN (A-1, B); BT [J] = "$" Ansistring (a); J ; INT i = 0; While (BT [i]! = "") {TEMP = TEMP BT [i]; i ;} TEMP = FUN (A-1, B-1) TEMP; BT [ J] = ""; J-;}}