%--pitagora.jsp Stampa la tabella pitagorica --%>
<%--<%@ page errorPage="/jsp/error.jsp" %> --%>
Tabella pitagorica
La tabella pitagorica
<% String s;
int x = ((s=request.getParameter("x"))==null) ? 10 : Integer.parseInt(s);
int y = ((s=request.getParameter("y"))==null) ? 10 : Integer.parseInt(s);
for (int i=1; i<=x; i++) {
%>
<% for (int j=1; j<=y; j++) {
if (i==1 || j==1) {
%>
<%= i*j %> |
<% } else {%>
<%= i*j %> |
<% }
} // fine ciclo interno
%>
<% } // fine ciclo esterno %>
Valida il documento