public/subjects/printrevcomb
xpetit 46f4ddc49e
Simplify prompt, execution of Go programs, fix typos
2021-04-28 11:47:34 +02:00
..
README.md Simplify prompt, execution of Go programs, fix typos 2021-04-28 11:47:34 +02:00

README.md

printrevcomb

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 :

$ go run . | cat -e
987, 986, 985, 984, 983, 982, 981, 980, 976, ..., 310, 210$
$

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.