Tabla de calificación panameña


/ Published in: JavaScript
Save to your folder(s)

Este es un programa que los puntajes y las calificaciones correspondientes a dicho puntaje.


Copy this code and paste it in your HTML
  1. <script>
  2. var p;
  3. var pt;
  4. var cali;
  5. var len;
  6. pt = 75;
  7. p = pt;
  8. while (p>=0)
  9. {
  10. cali = 4 * p / pt;
  11. cali = cali + 1;
  12. cali = Math.round(cali*10)/10;
  13. if (cali == 1 || cali == 2 || cali == 3 || cali == 4 || cali == 5)
  14. {cali = cali + ".0"}
  15. document.write(p + "--" + cali + "<br>");
  16.  
  17. p=p-1;
  18. }
  19. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.