From 3d688954f956fcbe241080e4fc2fc8633c8ccbb7 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Thu, 3 Oct 2019 07:55:27 +0100 Subject: [PATCH] update de splitprog subjects en and fr --- subjects/splitprog.en.md | 12 ++++++------ subjects/splitprog.fr.md | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 subjects/splitprog.fr.md diff --git a/subjects/splitprog.en.md b/subjects/splitprog.en.md index cea8a5787..fa97d6d71 100644 --- a/subjects/splitprog.en.md +++ b/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?" diff --git a/subjects/splitprog.fr.md b/subjects/splitprog.fr.md new file mode 100644 index 000000000..b6e20946c --- /dev/null +++ b/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$ +```