code011.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>练习</title>
</head>
<body>
<%
//计算5的阶乘
int sum = 1;
for(int i=1;i<=5;i++)
{
sum = sum * i;
}
%>
<p>5的阶乘=<%= sum %></p>
</body>
</html>