Why does this code write the answers more than once instead of just once?
I’ve just made a C program about finding perfect numbers. It is kinda working, but it writes out the answers more than once(and it writes 24 as well for some reason).
I have very basic C knowledge, I thought it’s simple enough.
The code: