aboutsummaryrefslogtreecommitdiff
path: root/exam00/rendu/ft_countdown
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-07-16 12:58:13 +0200
committerCharles <sircharlesaze@gmail.com>2019-07-16 12:58:13 +0200
commit14914f50c3de6c5444e13cf67db064b03c1c90ef (patch)
tree3ecf5a41b4541980ba0287a431681cd5ae25ad84 /exam00/rendu/ft_countdown
parent217bcb0d4e3ba60604921cb40d5a11a64f93cfc7 (diff)
downloadpiscine-14914f50c3de6c5444e13cf67db064b03c1c90ef.tar.gz
piscine-14914f50c3de6c5444e13cf67db064b03c1c90ef.tar.bz2
piscine-14914f50c3de6c5444e13cf67db064b03c1c90ef.zip
c09 passed, c10 start, exam00 and exam01
Diffstat (limited to 'exam00/rendu/ft_countdown')
-rwxr-xr-xexam00/rendu/ft_countdown/ft_countdown.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/exam00/rendu/ft_countdown/ft_countdown.c b/exam00/rendu/ft_countdown/ft_countdown.c
new file mode 100755
index 0000000..67861c6
--- /dev/null
+++ b/exam00/rendu/ft_countdown/ft_countdown.c
@@ -0,0 +1,20 @@
+#include <unistd.h>
+
+void ft_putchar(char c)
+{
+ write(1, &c, 1);
+}
+
+int main(void)
+{
+ char a;
+
+ a = '9';
+ while (a >= '0')
+ {
+ ft_putchar(a);
+ a--;
+ }
+ ft_putchar('\n');
+}
+