Module ladderz::pre_algebra
source · Expand description
Various pre-algebra implementations including factor pairs, factors, multiples, and more.
Example
use ladderz::pre_algebra::get_factors;
fn main() {
let x: u32 = 10;
println!("The factors of {x} are {:?}.", get_factors(x));
}The factors of 10 are {1, 5, 2, 10}.
Functions
- Finds all factor pairs for a positive integer
n. - Finds all factors of a positive integer
n. - Finds all the multiples of a positive integer
nup to and includingend(in the range [n, end]). - Checks if a positive integer
xis a factor of another positive integery. - Checks if a positive integer
xis a multiple of another positive integery.