Finding a Factorial
Finding a Factorial
<%
int value = 6, factorial = 1, temporaryValue = value;
while (temporaryValue > 0) {
factorial *= temporaryValue;
temporaryValue--;
}
out.println("The factorial of " + value + " is " + factorial + ".");
%>