Some checks failed
SonarQube Scan / SonarQube Trigger (push) Failing after 1m48s
Fix #379 Add a validator step, fix invalid attributes
24 lines
485 B
Java
24 lines
485 B
Java
import java.lang.Integer;
|
|
import java.lang.Double;
|
|
import java.lang.System;
|
|
import java.io.PrintStream;
|
|
|
|
public class Bug379 {
|
|
public Fun1$$<Double, Double> fact = (x) -> {
|
|
if (x == 1) {
|
|
return 1;
|
|
} else {
|
|
return x * (fact.apply(x-1));
|
|
}
|
|
};
|
|
|
|
public getFact(x) {
|
|
return fact.apply(x);
|
|
}
|
|
|
|
public static void main(x) {
|
|
var f = new Bug379();
|
|
var intRes = f.getFact(3);
|
|
System.out.println(intRes);
|
|
}
|
|
} |