04-22-2023, 11:06 PM
(04-22-2023, 09:30 PM)Kernelpanic Wrote: And why does it work in the second program? The declaration is exactly the same.
I know this is no longer necessary in QB64, but for me it's for clarity.
This kept the program from running infinitely.
Code: (Select All)
If n > 0 Then
fak = n * fakultaet(n - 1)
End If
Though its kinda odd it did stop and print the factorial.
The first program kept subtracting 1 from n with no bottom limit.
b = b + ...