Advertisement
CoyoteCrafty

ft_countdown.c

Oct 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.09 KB | None | 0 0
  1. /* ************************************************************************** */
  2. /*                                                                            */
  3. /*                                                        :::      ::::::::   */
  4. /*   ft_countdown.c                                     :+:      :+:    :+:   */
  5. /*                                                    +:+ +:+         +:+     */
  6. /*   By: mduclos <marvin@42.fr>                     +#+  +:+       +#+        */
  7. /*                                                +#+#+#+#+#+   +#+           */
  8. /*   Created: 2018/10/22 18:45:08 by mduclos           #+#    #+#             */
  9. /*   Updated: 2018/10/22 18:45:12 by mduclos          ###   ########.fr       */
  10. /*                                                                            */
  11. /* ************************************************************************** */
  12.  
  13. #include <unistd.h>
  14.  
  15. void    ft_putchar(char c)
  16. {
  17.     write(1, &c, 1);
  18. }
  19.  
  20. int     main(void)
  21. {
  22.     int i;
  23.  
  24.     i = 9;
  25.     while (i >= 0)
  26.     {
  27.         ft_putchar(i + '0');
  28.         i--;
  29.     }
  30.     ft_putchar('\n');
  31.     return (0);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement