aboutsummaryrefslogtreecommitdiff
path: root/exam02/subjects/0-0-aff_a
diff options
context:
space:
mode:
Diffstat (limited to 'exam02/subjects/0-0-aff_a')
-rw-r--r--exam02/subjects/0-0-aff_a/subject.en.txt20
-rw-r--r--exam02/subjects/0-0-aff_a/subject.fr.txt22
2 files changed, 42 insertions, 0 deletions
diff --git a/exam02/subjects/0-0-aff_a/subject.en.txt b/exam02/subjects/0-0-aff_a/subject.en.txt
new file mode 100644
index 0000000..c8863b4
--- /dev/null
+++ b/exam02/subjects/0-0-aff_a/subject.en.txt
@@ -0,0 +1,20 @@
+Assignment name : aff_a
+Expected files : aff_a.c
+Allowed functions: write
+--------------------------------------------------------------------------------
+
+Write a program that takes a string, and displays the first 'a' character it
+encounters in it, followed by a newline. If there are no 'a' characters in the
+string, the program diplays 'a' followed by a newline. If the number of parameters is not
+1, the program displays 'a' followed by a newline.
+
+Example:
+
+$> ./aff_a "abc" | cat -e
+a$
+$> ./aff_a "RaInB0w d4Sh!" | cat -e
+a$
+$> ./aff_a "ThE Ck3 Is L|3" | cat -e
+a$
+$> ./aff_a | cat -e
+a$
diff --git a/exam02/subjects/0-0-aff_a/subject.fr.txt b/exam02/subjects/0-0-aff_a/subject.fr.txt
new file mode 100644
index 0000000..3dadbad
--- /dev/null
+++ b/exam02/subjects/0-0-aff_a/subject.fr.txt
@@ -0,0 +1,22 @@
+Assignment name : aff_a
+Expected files : aff_a.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 'a' rencontré dans
+cette chaîne, suivi de '\n'. Si aucun 'a'
+n'est rencontré dans la chaîne, le programme affiche 'a' suivi de
+'\n'. Si le nombre de paramètres est différent de 1, le
+programme affiche 'a' suivi de '\n'.
+
+Exemple:
+
+$> ./aff_a "abc" | cat -e
+a$
+$> ./aff_a "dubO a POIL" | cat -e
+a$
+$> ./aff_a "zaz sent le poney" | cat -e
+a$
+$> ./aff_a | cat -e
+a$