JavaTXCompilerInJavaTX/test/bytecode/javFiles/Faculty.jav
Fayez Abu Alia 673c249b68 modified: src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java
new file:   src/de/dhbwstuttgart/bytecode/IfStatement.java
Bytecode für If statement wir erzeugt aber noch nicht vollständig.
	modified:   test/bytecode/javFiles/Faculty.jav
Test angepasst.
2018-09-19 15:52:29 +02:00

33 lines
454 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 < 2) {
return x;
}
else {
return x * m(x-1);
}
}
}