misc

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

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

update

Diffstat:
Mperfect.h | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

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