here you go:
for (row = 1; row <= 5; row++)
{
for (column = 1; column <= 5; column++)
{
if ( (row < column) && (column > 5 - row + 1) )
{
printf("B");
}
else
{
printf("A");
}
}
printf("\n");
}
explanation :
condition (row < column)
'draws':
ABBBB
AABBB
AAABB
AAAAB
AAAAA
condition (column > 5 - row + 1)
'draws' :
AAAAA
AAAAB
AAABB
AABBB
ABBBB
the combination of these condition is you result.