JavaCompilerCore/test/bytecode/javFiles/Faculty.jav
Fayez Abu Alia 2add9f518c Richtiger Bytecode fuer If-Statements wird erzeugt.
modified:   test/bytecode/FacultyTest.java
FacultyTest geaendert.

	new file:   test/bytecode/VectorAddTest.java
VectorAddTest hinzugefuegt.
2018-09-26 13:46:34 +02:00

34 lines
467 B
Java

import java.lang.Integer;
public class Faculty {
m (x) {
// var fact = (x) -> {
// if (x == 1) {
// return x;
// }
// else {
// return x * (fact.apply(x-1));
// }
// };
// return fact;
// var x = 13;
// if(x>22) {
// return 0;
// }else if(x <1){
// return x;
// }else {
// return 1;
// }
if (x < 0) {
return 0;
}else if(x<2) {
return x;
} else {
return x * m(x-1);
}
}
}