Jump to content

Proper divisors: Difference between revisions

m
→‎{{header|AppleScript}}: Idiomatic: Minor edit in handler.
(Undo revision 324745 by Drkameleon (talk))
m (→‎{{header|AppleScript}}: Idiomatic: Minor edit in handler.)
Line 650:
if (n > 1) then
set sqrt to n ^ 0.5
ifset limit to (sqrt moddiv 1 is 0) then
if (limit set end of output to= sqrt) as integerthen
set sqrtend toof sqrtoutput -to 1limit
set limit to limit - 1
end if
repeat with i from (sqrt div 1)limit to 2 by -1
if (n mod i is 0) then
set beginning of output to i
557

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.