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.

43 lines
457 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
import (
"fmt"
"student"
)
5 years ago
func main() {
fmt.Println(student.Lcm(2, 7))
fmt.Println(student.Lcm(0, 4))
5 years ago
}
```
### Output
```console
$ go run .
5 years ago
14
0
$
5 years ago
```