Browse Source

update de splitprog subjects en and fr

content-update
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
3d688954f9
  1. 12
      subjects/splitprog.en.md
  2. 24
      subjects/splitprog.fr.md

12
subjects/splitprog.en.md

@ -2,19 +2,19 @@
### Instructions
Write a program that separates the words of a `string` and puts them in a `string` array and then prints it to standard output.
Write a program which separates the words of a `string`, which puts them in a `string` array and which then prints it to standard output.
- The program receives two parameters:
The program receives two parameters:
- The first parameter is the `string`
- The second parameter is the `separator`
- The first is the `string`
- The second is the separator
### Expected output :
```console
student@ubuntu:~/piscine-go/splitprog$ go build
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA
[Hello how are you?]
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA | cat -e
[Hello how are you?]$
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "Hello,how,are,you?" ","
[Hello how are you?]
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?"

24
subjects/splitprog.fr.md

@ -0,0 +1,24 @@
## splitprog
### Instructions
Écrire une fonction qui sépare les mots d'une `string`, qui les met dans un tableau de `string` et qui les affichent sur la sortie standard.
Le programme reçoit deux paramètres:
- Le premier est la `string`
- Le deuxième est le séparateur
### Expected output :
```console
student@ubuntu:~/piscine-go/splitprog$ go build
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA | cat -e
[Hello how are you?]$
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "Hello,how,are,you?" ","
[Hello how are you?]
student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?"
student@ubuntu:~/piscine-go/splitprog$
student@ubuntu:~/piscine-go/splitprog$ ./splitprog
student@ubuntu:~/piscine-go/splitprog$
```
Loading…
Cancel
Save