Coprimes: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: simplified the function.) |
|||
Line 319: | Line 319: | ||
flag = 1 |
flag = 1 |
||
if Coprimes[n][1] < Coprimes[n][2] |
if Coprimes[n][1] < Coprimes[n][2] |
||
min = Coprimes[n][1] |
|||
else |
else |
||
min = Coprimes[n][2] |
|||
ok |
ok |
||
for m = 2 to |
for m = 2 to min |
||
if Coprimes[n][1]%m = 0 and Coprimes[n][2]%m = 0 |
if Coprimes[n][1]%m = 0 and Coprimes[n][2]%m = 0 |
||
flag = 0 |
flag = 0 |