diff --git a/ladderz/all.html b/ladderz/all.html index 48b2d15..afd8fea 100644 --- a/ladderz/all.html +++ b/ladderz/all.html @@ -1 +1 @@ -
pub fn is_composite(n: u32) -> boolChecks if a positive integer n is a composite number.
A composite number is a positive integer that is evenly divisible +by a positive integer other than 1 and itself.
+use ladderz::pre_algebra::is_composite;
+
+assert!(!is_composite(1)); // 1 is not a composite number
+assert!(!is_composite(2)); // 2 is not a composite number
+assert!(is_composite(4)); // 4 is a composite number
+assert!(!is_composite(7)); // 7 is not a composite numberpub fn is_prime(n: u32) -> boolChecks if a positive integer n is a prime number.
A prime number is a positive integer greater than 1 that cannot -be evenly divisible by any positive integers other than 1 and itself.
+A prime number is a positive integer greater than 1 that is +not evenly divisible by any positive integer other than 1 and itself.
use ladderz::pre_algebra::is_prime;
diff --git a/ladderz/pre_algebra/index.html b/ladderz/pre_algebra/index.html
index 46c4cd3..da537b9 100644
--- a/ladderz/pre_algebra/index.html
+++ b/ladderz/pre_algebra/index.html
@@ -5,4 +5,4 @@
let x: u32 = 10;
println!("The factors of {x} are {:?}.", get_factors(x));The factors of 10 are {1, 5, 2, 10}.
-n.n.n up to and including end (in the range [n, end]).x is a factor of another positive integer y.x is a multiple of another positive integer y.n is a prime number.n.n.n up to and including end (in the range [n, end]).n is a composite number.x is a factor of another positive integer y.x is a multiple of another positive integer y.n is a prime number.