You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
411 B

5 years ago
## lcm
### Instructions
Write a function, `lcm`, that returns least common multiple.
It will be tested with positive `int` values and `0`.
5 years ago
### Expected function
```go
func Lcm(first, second int) int {
}
```
### Usage
Here is a possible program to test your function :
```go
package main
func main() {
5 years ago
fmt.Println(Lcm(2, 7))
fmt.Println(Lcm(0, 4))
5 years ago
}
```
### Output
```console
$ go run .
5 years ago
14
0
$
5 years ago
```