I am missing one thing in the code because it's printing me the dots in every height case.. Can anyone give me a hint how to solve that ?
int main(void)
{
int n;
do
{
n = get_int("Height: ");
}
while (n < 1 || n > 8);
for (int i = 0; i < n; i++)
{
for (int k = 7; (k > i); k--)
{
printf(".");
}
for (int j = -1; j < i; j++)
{
printf("#");
}
printf("\n");
}
}