Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- euklides :: Int -> Int -> Int
- euklides a b
- | b == 0 = a
- | otherwise = euklides b (modulo a b)
- modulo :: Int -> Int -> Int
- modulo a b
- | a > b = modulo (a - b) b
- | a == b = 0
- | otherwise = a
- xs=[1..10]
- ys=[1..10]
- main = do
- print [((x, y), euklides x y) | x <- xs, y<-ys]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement