diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-07-26 23:17:36 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-07-26 23:17:36 +0200 |
| commit | 8ec5431354bdb582455e8c32758098c5a0fdada2 (patch) | |
| tree | 480c68814f822439850029df0e0249a2cafb8177 /exam_final/subjects/0-0-aff_z | |
| parent | 475449dd4b1f3308bac6f72c34d87812216a0738 (diff) | |
| download | piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.gz piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.bz2 piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.zip | |
exam final
Diffstat (limited to 'exam_final/subjects/0-0-aff_z')
| -rw-r--r-- | exam_final/subjects/0-0-aff_z/examples.txt | 8 | ||||
| -rw-r--r-- | exam_final/subjects/0-0-aff_z/subject.en.txt | 21 | ||||
| -rw-r--r-- | exam_final/subjects/0-0-aff_z/subject.fr.txt | 22 |
3 files changed, 51 insertions, 0 deletions
diff --git a/exam_final/subjects/0-0-aff_z/examples.txt b/exam_final/subjects/0-0-aff_z/examples.txt new file mode 100644 index 0000000..f15ada3 --- /dev/null +++ b/exam_final/subjects/0-0-aff_z/examples.txt @@ -0,0 +1,8 @@ +$> ./aff_z "abc" | cat -e +z$ +$> ./aff_z "dubO a POIL" | cat -e +z$ +$> ./aff_z "zaz sent le poney" | cat -e +z$ +$> ./aff_z | cat -e +z$ diff --git a/exam_final/subjects/0-0-aff_z/subject.en.txt b/exam_final/subjects/0-0-aff_z/subject.en.txt new file mode 100644 index 0000000..e11a0b3 --- /dev/null +++ b/exam_final/subjects/0-0-aff_z/subject.en.txt @@ -0,0 +1,21 @@ +Assignment name : aff_z +Expected files : aff_z.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Write a program that takes a string, and displays the first 'z' +character it encounters in it, followed by a newline. If there are no +'z' characters in the string, the program writes 'z' followed +by a newline. If the number of parameters is not 1, the program displays +'z' followed by a newline. + +Example: + +$> ./aff_z "abc" | cat -e +z$ +$> ./aff_z "RaInB0w d4Sh!" | cat -e +z$ +$> ./aff_z "ThE C4k3 Is a L|3" | cat -e +z$ +$> ./aff_z | cat -e +z$
\ No newline at end of file diff --git a/exam_final/subjects/0-0-aff_z/subject.fr.txt b/exam_final/subjects/0-0-aff_z/subject.fr.txt new file mode 100644 index 0000000..196702e --- /dev/null +++ b/exam_final/subjects/0-0-aff_z/subject.fr.txt @@ -0,0 +1,22 @@ +Assignment name : aff_z +Expected files : aff_z.c +Allowed functions: write +-------------------------------------------------------------------------------- + +Écrire un programme qui prend en paramètre une chaîne de caractères, et qui +affiche sur la sortie standard le premier caractère 'z' rencontré dans +cette chaîne, suivi de '\n'. Si aucun 'z' +n'est rencontré dans la chaîne, le programme affiche 'z' suivi de +'\n'. Si le nombre de paramètres est différent de 1, le +programme affiche 'z' suivi de '\n'. + +Exemple: + +$> ./aff_z "abc" | cat -e +z$ +$> ./aff_z "dubO a POIL" | cat -e +z$ +$> ./aff_z "zaz sent le poney" | cat -e +z$ +$> ./aff_z | cat -e +z$ |
