Greatest common divisor: Difference between revisions

Line 478:
a := abs( m );
b := abs( n );
ifwhile ab not = 0 thendo begin
newA := b;
endb := a rem b;
else begin a := newA;
while b not = 0 do beginend;
newA := b;a
b := a rem b;
a := newA;
end;
a
end
end gcd ;
 
write( gcd( -21, 35 ) );
end.
end.</syntaxhighlight>
 
=={{header|Alore}}==
3,026

edits