for (n = 1; n <= num1, n++)
{
num2 = num1 - n;
printf("%*s%*c\n", num2, "", n, '#');
}
I'm trying to get a half-pyramid of hashtags, with the bottom-left corner left-aligned, and the height x width determined by a single input(num1). Like this:
num1 = 4
Output:
#
##
###
####
Instead, I'm getting this (with an input of 4):
#
#
#
#