#include <unistd.h>

void rush(int x, int y)
{
    int id_x;
    int id_y = 1;

    while (id_y < y)
    {
        id_x = 1;
        while (id_x < x)
        {
            if ((id_y == 1 && id_x == 1) || (id_y == y && id_x == x && x > 0 && y > 0)) // Top left or bottom right corner
            {
                write(1, "A", 1);
            }
            else if ((id_y == 1 && id_x == x) || (id_y == y && id_x == 1)) // Top right or bottom left corner
            {
                write(1, "C", 1);
            }
            else if (id_y == 1 || id_y == y || id_x == 1 || id_x == x) // Edges
            {
                write(1, "B", 1);
            }
            else // Middle
            {
                write(1, " ", 1);
            }
            id_x++;
        }
        write(1, "\n", 1);
        id_y++;
    }
}
int main()
{

    rush(4,4);
    return 0;
}

Embed on website

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