anchor.diff:                   <td> Juros (R$) </td>
                    <td> Dívida (R$) </td>
                </tr>
  -             <%for(int i=0; i<=p; i++){%>
  +             <%for(int x=0; x<=t; x++){%>
                <tr>
  -                 <td><%=i%></td>
  -                 <%if(i==p){
  +                 <td><%=x%></td>
  +                 <%if(x==t){
                    out.println("<td>"+v+"</td>");
                    }
                    else{
                    out.println("<td>"+0+"</td>");
                    }%>
  -                 <%if(i!=0){
  -                 out.println("<td>"+v*j*0.01+"</td>");
  +                 <%if(x!=0){
  +                 out.println("<td>"+v*i*0.01+"</td>");
                    }
                    else{
                    out.println("<td>"+0+"</td>");
                    }%>
  -                 <%if(i==p){
  +                 <%if(x==t){
                    out.println("<td>"+0+"</td>");
                    }
                    else{
  
positive.code:         <h1>Amortização Americana</h1>
           <hr/>
           <%
               int p=10;
               int v=0;
               int j=0;
               try{
                   p = Integer.parseInt(request.getParameter("p"));
                   v = Integer.parseInt(request.getParameter("v"));
                   j = Integer.parseInt(request.getParameter("j"));}
               catch(Exception e){}
           %>
           <form>
           <table>
               <tr>
                   <td>Período (em meses): </td>
                   <td><input type="number" name="p" value="<%=p%>"/></td>
               </tr>
               <tr>
                   <td>Valor (em R$): </td>
  
negative.code:              </tr>
               <tr>
                   <td>Juros (%a.m.): </td>
                   <td><input type="number" name="i" value="<%=i%>"/><td>
               </tr>
               <tr>
                   <td colspan="2"><input type="submit" value="Calcular"/></td>
  