1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
2023-08-03 23:16:27 +02:00

42 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rush00.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ttrave <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/14 21:13:37 by ttrave #+# #+# */
/* Updated: 2023/07/16 11:30:51 by ttrave ### ########.fr */
/* */
/* ************************************************************************** */
void ft_putchar(char c);
void rush(int x, int y)
{
int w;
int h;
w = 1;
h = 1;
while (y > 0 && h <= y)
{
while (x > 0 && w <= x)
{
if (((h == 1 || h == y) && w == 1)
|| ((h == 1 || h == y) && w == x))
ft_putchar('o');
else if (w == x || w == 1)
ft_putchar('|');
else if (h == 1 || h == y)
ft_putchar('-');
else
ft_putchar(' ');
w++;
}
ft_putchar('\n');
w = 1;
h++;
}
}