aboutsummaryrefslogtreecommitdiff
path: root/exam_final/subjects/13-0-infin_add
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/13-0-infin_add
parent475449dd4b1f3308bac6f72c34d87812216a0738 (diff)
downloadpiscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.gz
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.tar.bz2
piscine-8ec5431354bdb582455e8c32758098c5a0fdada2.zip
exam final
Diffstat (limited to 'exam_final/subjects/13-0-infin_add')
-rw-r--r--exam_final/subjects/13-0-infin_add/examples.txt7
-rw-r--r--exam_final/subjects/13-0-infin_add/subject.en.txt24
-rw-r--r--exam_final/subjects/13-0-infin_add/subject.fr.txt25
3 files changed, 56 insertions, 0 deletions
diff --git a/exam_final/subjects/13-0-infin_add/examples.txt b/exam_final/subjects/13-0-infin_add/examples.txt
new file mode 100644
index 0000000..79fffd5
--- /dev/null
+++ b/exam_final/subjects/13-0-infin_add/examples.txt
@@ -0,0 +1,7 @@
+$> ./infin_add "879879087" "67548976597" | cat -e
+68428855684$
+$> ./infin_add "-876435" "987143265" | cat -e
+986266830$
+$> ./infin_add "-807965" "-34532"
+-842497
+$>
diff --git a/exam_final/subjects/13-0-infin_add/subject.en.txt b/exam_final/subjects/13-0-infin_add/subject.en.txt
new file mode 100644
index 0000000..a531aa1
--- /dev/null
+++ b/exam_final/subjects/13-0-infin_add/subject.en.txt
@@ -0,0 +1,24 @@
+Assignment name : infin_add
+Expected files : *.c, *.h
+Allowed functions: write, malloc, free
+--------------------------------------------------------------------------------
+
+Write a program that takes as a parameter two strings that represent two
+numbers potentially infinit, and displays on stdout the result of the addition
+of these two numbers, followed by a '\n'.
+
+A negative number will always be prefixed by one and only one -. The only
+characters that can be part of the strings are digits and the sign -.
+
+Both parameters will always be well formated, and you will always have
+exactly two parameters, no tricks.
+
+Example:
+
+$> ./infin_add "879879087" "67548976597" | cat -e
+68428855684$
+$> ./infin_add "-876435" "987143265" | cat -e
+986266830$
+$> ./infin_add "-807965" "-34532"
+-842497
+$>
diff --git a/exam_final/subjects/13-0-infin_add/subject.fr.txt b/exam_final/subjects/13-0-infin_add/subject.fr.txt
new file mode 100644
index 0000000..3f780f8
--- /dev/null
+++ b/exam_final/subjects/13-0-infin_add/subject.fr.txt
@@ -0,0 +1,25 @@
+Assignment name : infin_add
+Expected files : *.c, *.h
+Allowed functions: write, malloc, free
+--------------------------------------------------------------------------------
+
+Écrire un programme qui prend en paramètres deux chaînes de caractères
+représentant des nombres de longueur potentiellement infinie, et affiche sur la
+sortie standard le résultat de l'addition de ces deux nombres, suivi d'un '\n'.
+
+Un nombre négatif sera précédé d'un et un seul signe -. Les seuls
+caractères qui feront potentiellement partie de ces chaînes sont les chiffres
+et le signe -.
+
+Tous les paramètres seront bien formatés, et il y a toujours exactement deux
+paramètres, pas de pièges.
+
+Exemple:
+
+$> ./infin_add "879879087" "67548976597" | cat -e
+68428855684$
+$> ./infin_add "-876435" "987143265" | cat -e
+986266830$
+$> ./infin_add "-807965" "-34532"
+-842497
+$>