Init next project
This commit is contained in:
8
Project-02/triplaprograms/ggT_euclid_rec.tripla
Normal file
8
Project-02/triplaprograms/ggT_euclid_rec.tripla
Normal file
@@ -0,0 +1,8 @@
|
||||
let ggT(a, b) {
|
||||
if (a == b) then
|
||||
a
|
||||
else if (a > b) then
|
||||
ggT(a-b, b)
|
||||
else
|
||||
ggT(b-a, a)
|
||||
} in ggT(3528, 3780) // result should be 252
|
||||
Reference in New Issue
Block a user