From 1acd1e62530d39de367ee90dbb6733ff3ddca621 Mon Sep 17 00:00:00 2001 From: Christopher Fremond Date: Thu, 3 Oct 2019 05:51:47 +0100 Subject: [PATCH] update of strlen subjects en and fr --- subjects/strlen.en.md | 2 +- subjects/strlen.fr.md | 2 +- subjects/strlenprog.en.md | 2 +- subjects/strlenprog.fr.md | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 subjects/strlenprog.fr.md diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md index 68618fc9..7f9e2b2c 100644 --- a/subjects/strlen.en.md +++ b/subjects/strlen.en.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that counts the characters of a string and that returns that count. +- Write a function that counts the characters of a `string` and that returns that count. ### Expected function diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md index de4de21f..183355ce 100644 --- a/subjects/strlen.fr.md +++ b/subjects/strlen.fr.md @@ -2,7 +2,7 @@ ### Instructions -- Écrire une fonction qui compte le nombre de caractères d'une chaîne et qui retourne le nombre trouvé. +- Écrire une fonction qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé. ### Fonction attendue diff --git a/subjects/strlenprog.en.md b/subjects/strlenprog.en.md index e0f0ab6e..10b755f3 100644 --- a/subjects/strlenprog.en.md +++ b/subjects/strlenprog.en.md @@ -4,7 +4,7 @@ - Write a program that counts the characters of a `string` and that returns that value. -- If the program receives more than one `string` or no arguments must not return anything (see the `Expected output`). +- If the program receives more than one or no arguments it must not print anything. ### Expected output : diff --git a/subjects/strlenprog.fr.md b/subjects/strlenprog.fr.md new file mode 100644 index 00000000..c4ffccfe --- /dev/null +++ b/subjects/strlenprog.fr.md @@ -0,0 +1,19 @@ +## strlenprog + +### Instructions + +- Écrire un programme qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé. + +- Si le programme reçoit plusieurs ou aucun arguments il ne doit rien afficher. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/strlenprog$ go build +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" +5 +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog +student@ubuntu:~/piscine-go/strlenprog$ +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" "how are you" +student@ubuntu:~/piscine-go/strlenprog$ +```