Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding "perfect" numbers
#1
i was trying to write a code for finding perfect numbers but I cannot seem to get it working. any ideas?

Function find_perfect_numbers
Code:
Copy      Help
int N D T F
F=0
N=28
D=2
T=0
;out D
;Start
if F=1
,end

if D%N=0
/////////////////////////
,T+D;;out D
/////////////////////////
if D=N
,F=1
,if N=T
,,out "yes"
,else
,,out "no"

;out 1
D+1
goto Start


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)