diff --git a/subjects/printrevcombprog.en.md b/subjects/printrevcombprog.en.md new file mode 100644 index 000000000..cc734935b --- /dev/null +++ b/subjects/printrevcombprog.en.md @@ -0,0 +1,22 @@ +## printrevcombprog + +### 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 +student@ubuntu:~/piscine-go/printcombprog$ go build +student@ubuntu:~/piscine-go/printcombprog$ ./printcombprog | cat -e +987, 986, 985, 984, 983, 982, 981, 980, 976, ..., 310, 210$ +student@ubuntu:~/piscine-go/printcombprog$ +``` + +`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. diff --git a/subjects/printrevcombprog.fr.md b/subjects/printrevcombprog.fr.md new file mode 100644 index 000000000..2a23f968e --- /dev/null +++ b/subjects/printrevcombprog.fr.md @@ -0,0 +1,22 @@ +## printrevcombprog + +### Instructions + +Écrire un programme qui affiche sur une seule ligne dans l'ordre décroissant toutes les combinaisons possibles de trois chiffres différents tels que le premier est supérieur au second et le second est supérieur au troisième. + +Les combinaisons sont séparées par une virgule et un espace. + +### Utilisation + +Voici une sortie **tronquée** : + +```console +student@ubuntu:~/piscine-go/printcombprog$ go build +student@ubuntu:~/piscine-go/printcombprog$ ./printcombprog | cat -e +987, 986, 985, 984, 983, 982, 981, 980, 976, ..., 310, 210$ +student@ubuntu:~/piscine-go/printcombprog$ +``` + +`999` et `000` ne sont pas des combinations valides parce que les chiffres ne sont pas différents. + +`789` ne doit pas être affiché parce que le premier chiffre n'est pas inférieur au second.