misc

Misc scripts and tools
git clone git://git.alexwennerberg.com/misc
Log | Files | Refs | README | LICENSE

commit c6683623c45cf550d8a41599fe63ab62d7985b9d
parent f6ce5fbafe6d56a6ed53f8b8c7000de423b7ca85
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 10 Oct 2021 22:20:14 -0700

added perfect number calculator

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

diff --git a/perfect.h b/perfect.h @@ -0,0 +1,6 @@ +// Determines whether an int is a perfect number. Don't use on numbers over 33550335 +int is_perfect(int i) { + if (i != 6 && i != 28 && i != 496 && i != 8128) { + return 0; + } +}