fix factorial segfault

This commit is contained in:
dankeyy 2023-03-17 21:36:02 +02:00
parent 4ed6609974
commit 6724475724
No known key found for this signature in database
GPG key ID: 9EBEF7DB1A70533D
2 changed files with 3 additions and 3 deletions

View file

@ -32,7 +32,7 @@ public class Demo {
// This can be implemented more peacefully but for sake of demonstration-
// this will panic from the roc side if n is negative
// and in turn will throw a JVM RuntimeException
long n = 3;
long n = 5;
System.out.println("Factorial of " + n + " is " + factorial(n) + "\n");
}