Advertisement
ADL_Rodrigo_Silva

Untitled

Jun 8th, 2022
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. // Dibujar la tabla del 1 (1, 12)
  3.  
  4. /*
  5.  
  6. 1 * 1 = 1;
  7. 1 * 2 = 2;
  8. 1 * 3 = 3;
  9.  
  10. ...
  11.  
  12. */
  13.  
  14.  
  15. var tabla = 1;
  16. var limiteInferior = 1;
  17. var limiteSuperior = 10;
  18.  
  19. for (let iteradorI=limiteInferior; iteradorI<=limiteSuperior; iteradorI++) { // 1, 2, 3 ... 13
  20.    
  21.     console.log("**** Tabla del " + iteradorI + " *****");
  22.  
  23.     for (let iteradorJ=limiteInferior; iteradorJ<=10; iteradorJ++) {
  24.         if (iteradorJ%2)
  25.             console.log(iteradorI + " * " + iteradorJ + " = " + iteradorI*iteradorJ); // 1*1=1,1*2=2 ...1*12=12
  26.     }  
  27.  
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement