Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Avant modifs :
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* colle00.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: etieberg <marvin@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2016/09/03 10:18:16 by etieberg #+# #+# */
- /* Updated: 2016/09/04 20:56:48 by etieberg ### ########.fr */
- /* */
- /* ************************************************************************** */
- void ft_putchar(char c);
- void ft_putline(int x)
- {
- int i;
- char o;
- char dsh;
- char c_return;
- i = 2;
- o = 'o';
- dsh = '-';
- c_return = '\n';
- ft_putchar(o);
- if (x > 1)
- {
- while (i < x)
- {
- ft_putchar(dsh);
- i++;
- }
- ft_putchar(o);
- }
- ft_putchar(c_return);
- }
- void ft_puthole(int x)
- {
- int i;
- char pipe;
- char space;
- char c_return;
- i = 2;
- pipe = '|';
- space = ' ';
- c_return = '\n';
- if (x == 1)
- ft_putchar(pipe);
- if (x > 1)
- {
- ft_putchar(pipe);
- while (i < x)
- {
- ft_putchar(space);
- i++;
- }
- ft_putchar(pipe);
- }
- ft_putchar(c_return);
- }
- void colle(int x, int y)
- {
- int i;
- i = 2;
- if (x <= 0)
- return ;
- if (y == 1)
- ft_putline(x);
- if (y > 1)
- {
- ft_putline(x);
- while (i < y)
- {
- ft_puthole(x);
- i++;
- }
- ft_putline(x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement