Advertisement
Guest User

ÒwÓ > UwU

a guest
Nov 12th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import java.io.*;
  2. import javax.servlet.*;
  3. import javax.servlet.http.*;
  4.  
  5. public class Jorge_4_3 extends HttpServlet {
  6. public void doGet(HttpServletRequest peticion, HttpServletResponse respuesta) throws ServletException, IOException {
  7. respuesta.setContentType("text/html");
  8. PrintWriter salida = respuesta.getWriter();
  9. String titulo = "Jorge 4.3";
  10. salida.println("<TITLE>" + titulo + "</TITLE>\n<BODY>");
  11. salida.println("<H1 ALIGN=CENTER>" + titulo + "</H1>\n\n");
  12. int combinaciones = 6;
  13.  
  14. salida.println("<table style = \"border: 1px solid pink\"");
  15.  
  16. for (int a = 1; a < combinaciones; a++) {
  17. salida.println("<tr style = \"border: 1px solid pink\">");
  18. for (int b = 1; b < combinaciones; b++) {
  19. for (int c = 1; c < combinaciones; c++) {
  20.  
  21. salida.println("<td style = \"border: 1px solid pink\">"+a+""+b+""+c+ "</td>");
  22. }
  23.  
  24. }
  25. salida.println("</tr>");
  26. }
  27.  
  28. salida.println("</table>");
  29. // salida.println(contador + "<BR>");
  30. salida.println("</BODY></HTML>");
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement