aboutsummaryrefslogtreecommitdiff
path: root/exam_final/subjects/10-0-count_alpha
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
committerCharles <sircharlesaze@gmail.com>2019-07-26 23:17:36 +0200
commit8ec5431354bdb582455e8c32758098c5a0fdada2 (patch)
tree480c68814f822439850029df0e0249a2cafb8177 /exam_final/subjects/10-0-count_alpha
parent475449dd4b1f3308bac6f72c34d87812216a0738 (diff)
downloadpiscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.gz
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.bz2
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.zip
exam final
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
+$