Browse Source

add of printcomb prog en and fr

pull/302/head
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
6d50d184c2
  1. 22
      subjects/printcombprog.en.md
  2. 22
      subjects/printcombprog.fr.md

22
subjects/printcombprog.en.md

@ -0,0 +1,22 @@
## printcombprog
### Instructions
Write a program that prints in ascending order 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.
### Usage
Here is an **incomplete** output :
```console
student@ubuntu:~/piscine-go/printcombprog$ go build
student@ubuntu:~/piscine-go/printcombprog$ ./printcombprog | cat -e
012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789$
student@ubuntu:~/piscine-go/printcombprog$
```
`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.

22
subjects/printcombprog.fr.md

@ -0,0 +1,22 @@
## printcombprog
### Instructions
Écrire un programme qui affiche sur une seule ligne dans l'ordre croissant toutes les combinaisons possibles de trois chiffres différents tels que le premier est inférieur au second et le second est infé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
012, 013, 014, 015, 016, 017, 018, 019, 023, ..., 689, 789$
student@ubuntu:~/piscine-go/printcombprog$
```
`000` et `999` ne sont pas des combinations valides parce que les chiffres ne sont pas différents.
`987` ne doit pas être affiché parce que le premier chiffre n'est pas inférieur au second.
Loading…
Cancel
Save