C-print

如何打印下面的字符?

$
##
$$$
###
$$$
##
$

示例 1:

int main()
{
char array[] = {'#', '$'};
for (int row = 1; row <= 7; row++) {
for (int hashNum = 1; hashNum <= 4 - abs(4 - row); hashNum++)
{
printf("%c", array[row % 2]);
}
printf("\n");
}
}