mirror of https://github.com/01-edu/public.git
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.
23 lines
741 B
23 lines
741 B
5 years ago
|
## printrevcomb
|
||
5 years ago
|
|
||
|
### Instructions
|
||
|
|
||
|
Write a program that prints in descending order on a single line all unique combinations of three different digits so that the first digit is greater than the second and the second is greater than the third.
|
||
|
|
||
|
These combinations are separated by a comma and a space.
|
||
|
|
||
|
### Usage
|
||
|
|
||
|
Here is an **incomplete** output :
|
||
|
|
||
|
```console
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/printrevcomb$ go build
|
||
|
student@ubuntu:~/[[ROOT]]/printrevcomb$ ./printrevcomb | cat -e
|
||
5 years ago
|
987, 986, 985, 984, 983, 982, 981, 980, 976, ..., 310, 210$
|
||
5 years ago
|
student@ubuntu:~/[[ROOT]]/printrevcomb$
|
||
5 years ago
|
```
|
||
|
|
||
|
`999` or `000` are not valid combinations because the digits are not different.
|
||
|
|
||
|
`789` should not be shown because the first digit is not greater than the second.
|