numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
205 stars 120 forks source link

A `factors(n)` function, and `proper_factors(n)` #918

Closed christianp closed 2 years ago

christianp commented 2 years ago

In runtime/scripts/math.js, define a function factors(n) which returns all the divisors of a given integer.