龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2022-11-1 13:03

【Combination】

[code]inputs: Num( numericsimple ), NumChosen( numericsimple ) ;

condition1 = NumChosen >= 1 and Num >= NumChosen ;
if condition1 then
        Combination = Factorial( Num ) / Factorial( Num - IntPortion( NumChosen ) )
         / Factorial( NumChosen )
else
        Combination = -1 ;
[/code]

页: [1]