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

41 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rush04.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ttrave <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/14 21:13:37 by ttrave #+# #+# */
/* Updated: 2023/07/16 11:33:48 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 ((w == 1 && h == 1) || (w == x && h == y))
ft_putchar('A');
else if ((w == x && h == 1) || (w == 1 && h == y))
ft_putchar('C');
else if (w == x || w == 1 || h == 1 || h == y)
ft_putchar('B');
else
ft_putchar(' ');
w++;
}
ft_putchar('\n');
w = 1;
h++;
}
}