Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
Procedure Factor(n)
|
||||
Protected Result=1
|
||||
While n>0
|
||||
Result*n
|
||||
n-1
|
||||
Wend
|
||||
ProcedureReturn Result
|
||||
EndProcedure
|
||||
|
||||
Macro C(n,k)
|
||||
(Factor(n)/(Factor(k)*factor(n-k)))
|
||||
EndMacro
|
||||
|
||||
If OpenConsole()
|
||||
Print("Enter value n: "): n=Val(Input())
|
||||
Print("Enter value k: "): k=Val(Input())
|
||||
PrintN("C(n,k)= "+str(C(n,k)))
|
||||
|
||||
Print("Press ENTER to quit"): Input()
|
||||
CloseConsole()
|
||||
EndIf
|
||||
Loading…
Add table
Add a link
Reference in a new issue