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