misc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.alexwennerberg.com/misc
Log | Files | Refs | README | LICENSE

commit fb3e75a9309854f15d02345293706083a22cc842
parent 1a142064dd98c8ed5a4bb037171a9eda9018407c
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 10 Oct 2021 22:43:00 -0700

add is even prime

Diffstat:
Mperfect.h | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/perfect.h b/perfect.h @@ -1,3 +1,5 @@ +// very helpful math functions + // Determines whether an int is a perfect number. // Don't use on perfect numbers over 33550335 int is_perfect(int i) { @@ -6,3 +8,7 @@ int is_perfect(int i) { } return 0; } + +int is_even_prime(int i) { + return i == 2; +}