#include <unistd.h>

void    ft_putchar(char c); 
void    rush(int x, int y); 

int     main(void)
{
        rush(1, 5); 
        return (0);
}

void    ft_putchar(char c)
{
        write(1, &c, 1); 
}

void    rush(int x, int y)
{
        int     idx_y;
        int     idx_x;

        idx_y = 0;
        while (++idx_y <= y)
        {
                idx_x = 0;
                while (++idx_x <= x)
                {
                        if ((idx_x == 1 && idx_y == 1) || (idx_x == x && idx_y == y)) 
                                ft_putchar('A');
                        else if ((idx_x == x && idx_y == 1) || (idx_x == 1 && idx_y == y)) 
                                ft_putchar('C');
                        else if (idx_y != 1 && idx_y != y)
                        {
                                if (idx_x > 1 && idx_x < x)
                                        ft_putchar(' ');
                                else
                                        ft_putchar('B');
                        }
                        else
                                ft_putchar('B');
                }
                write(1, "\n", 1); 
        }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: