<%@ page language="java" pageEncoding="UTF-8" %>
<%@ page contentType="text/html; charset=utf-8" %>
1到10求和
<% int sum=0; for( int i=1;i<=10;i++){ sum+=i;} %> 结果为: <%=sum%><%@ page language="java" pageEncoding="UTF-8" %>
<%@ page contentType="text/html; charset=utf-8" %>
1到10求和
<% int sum=0; for( int i=1;i<=10;i++){ sum+=i;} %> 结果为: <%=sum%>