aboutsummaryrefslogtreecommitdiff
path: root/exam_final/subjects/10-0-count_alpha
diff options
context:
space:
mode:
Diffstat (limited to 'exam_final/subjects/10-0-count_alpha')
-rw-r--r--exam_final/subjects/10-0-count_alpha/subject.en.txt25
-rw-r--r--exam_final/subjects/10-0-count_alpha/subject.fr.txt24
2 files changed, 49 insertions, 0 deletions
diff --git a/exam_final/subjects/10-0-count_alpha/subject.en.txt b/exam_final/subjects/10-0-count_alpha/subject.en.txt
new file mode 100644
index 0000000..a057f70
--- /dev/null
+++ b/exam_final/subjects/10-0-count_alpha/subject.en.txt
@@ -0,0 +1,25 @@
+Assignment name : count_alpha
+Expected files : count_alpha.c
+Allowed functions: write, printf
+--------------------------------------------------------------------------------
+
+Write a program called count_alpha that takes a string and displays the number
+of occurences of its alphabetical characters. Other characters are not counted.
+The order is the order of occurence in the string. The display must be ended by
+a newline.
+
+The format is in the examples.
+
+If the number of arguments is not 1, display only a newline.
+
+Examples :
+$> ./count_alpha abbcc
+1a, 2b, 2c
+$> ./count_alpha "abbcc"
+1a, 2b, 2c
+$> ./count_alpha "abbcc" "dddeef" | cat -e
+$
+$> ./count_alpha "My Hyze 47y 7." | cat -e
+1m, 3y, 1h, 1z, 1e$
+$> ./count_alpha "" | cat -e
+$
diff --git a/exam_final/subjects/10-0-count_alpha/subject.fr.txt b/exam_final/subjects/10-0-count_alpha/subject.fr.txt
new file mode 100644
index 0000000..0971bc4
--- /dev/null
+++ b/exam_final/subjects/10-0-count_alpha/subject.fr.txt
@@ -0,0 +1,24 @@
+Assignment name : count_alpha
+Expected files : count_alpha.c
+Allowed functions: write, printf
+--------------------------------------------------------------------------------
+
+Écrire un programme count_alpha qui prend une chaîne et affiche le nombre d'occurences
+de ses caractères alphabétiques. Les autres caractères ne sont pas comptés. L'ordre est l'ordre d'apparition dans la chaîne.
+L'affichage doit être terminé par un newline.
+
+Le format est dans les exemples.
+
+Si le nombre d'arguments n'est pas 1, afficher juste un newline.
+
+Exemples :
+$> ./count_alpha abbcc
+1a, 2b, 2c
+$> ./count_alpha "abbcc"
+1a, 2b, 2c
+$> ./count_alpha "abbcc" "dddeef" | cat -e
+$
+$> ./count_alpha "My Hyze 47y 7." | cat -e
+1m, 3y, 1h, 1z, 1e$
+$> ./count_alpha "" | cat -e
+$