Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
22
Task/Multifactorial/FreeBASIC/multifactorial.freebasic
Normal file
22
Task/Multifactorial/FreeBASIC/multifactorial.freebasic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
' 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue