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.

46 lines
861 B

6 years ago
## printcomb
6 years ago
### Instructions
3 years ago
Write a function that prints, in ascending order and on a single line: all **unique** combinations of three different digits so that, the first digit is lower than the second, and the second is lower than the third.
These combinations are separated by a comma and a space.
6 years ago
### Expected function
```go
func PrintComb() {
}
```
6 years ago
### Usage
Here is a possible program to test your function :
```go
package main
import "piscine"
func main() {
piscine.PrintComb()
}
```
This is the incomplete output :
```console
4 years ago
$ go run . | cat -e
012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789$
4 years ago
$
```
- `000` or `999` are not valid combinations because the digits are not different.
- `987` should not be shown because the first digit is not less than the second.
### Notions
- [01-edu/z01](https://github.com/01-edu/z01)