MiniJavaCompiler/Test/JavaSources/TestLoop.java

13 lines
196 B
Java

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