langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,23 @@
$ include "seed7_05.s7i";
const func integer: gcd (in var integer: a, in var integer: b) is func
result
var integer: gcd is 0;
local
var integer: help is 0;
begin
while a <> 0 do
help := b rem a;
b := a;
a := help;
end while;
gcd := b;
end func;
const func integer: lcm (in integer: a, in integer: b) is
return a div gcd(a, b) * b;
const proc: main is func
begin
writeln("lcm(35, 21) = " <& lcm(21, 35));
end func;