MiniJavaCompiler/Test/JavaSources/TestLoop.java

20 lines
300 B
Java
Raw Normal View History

public class TestLoop {
public int factorial(int n)
{
int tally = 1;
for(int i = 1; i <= n; i++)
{
tally *= i;
}
return tally;
}
2024-07-03 14:32:54 +00:00
int weirdFor() {
int k = 0;
for (; k < 5; k++) {
}
return k;
}
}