diff options
Diffstat (limited to 'exam00/cacharle/ft_countdown')
| -rwxr-xr-x | exam00/cacharle/ft_countdown/ft_countdown.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/exam00/cacharle/ft_countdown/ft_countdown.c b/exam00/cacharle/ft_countdown/ft_countdown.c new file mode 100755 index 0000000..67861c6 --- /dev/null +++ b/exam00/cacharle/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'); +} + |
