Anonymous user
Greatest common divisor: Difference between revisions
m
→{{header|REXX}}: changed the output to use a template. -- ~~~~
(adding maxima) |
m (→{{header|REXX}}: changed the output to use a template. -- ~~~~) |
||
Line 1,861:
say 'the GCD of 496 and 8128 is' gcd(496,8128)
exit /*──(above)──two perfect numbers.*/
/*─────────────────────────────────────GCD subroutine───any num of args.*/
gcd: procedure; parse arg x,y /*find greatest common divisor. */
Line 1,874 ⟶ 1,873:
return x</lang>
'''output'''
<pre style="
the GCD of 7 and 21 is 7
the GCD of 4 and 7 is 1
|