23 lines
444 B
Text
23 lines
444 B
Text
|
|
' FB 1.05.0 Win64
|
||
|
|
|
||
|
|
Function multiFactorial (n As UInteger, degree As Integer) As UInteger
|
||
|
|
If n < 2 Then Return 1
|
||
|
|
Var result = n
|
||
|
|
For i As Integer = n - degree To 2 Step -degree
|
||
|
|
result *= i
|
||
|
|
Next
|
||
|
|
Return result
|
||
|
|
End Function
|
||
|
|
|
||
|
|
For degree As Integer = 1 To 5
|
||
|
|
Print "Degree"; degree; " => ";
|
||
|
|
For n As Integer = 1 To 10
|
||
|
|
Print multiFactorial(n, degree); " ";
|
||
|
|
Next n
|
||
|
|
Print
|
||
|
|
Next degree
|
||
|
|
|
||
|
|
Print
|
||
|
|
Print "Press any key to quit"
|
||
|
|
Sleep
|