MiniJavaCompiler/Test/JavaSources/TestLoop.java
2024-07-03 16:32:54 +02:00

20 lines
300 B
Java

public class TestLoop {
public int factorial(int n)
{
int tally = 1;
for(int i = 1; i <= n; i++)
{
tally *= i;
}
return tally;
}
int weirdFor() {
int k = 0;
for (; k < 5; k++) {
}
return k;
}
}