My code looks fine but "make mario" insists that "Error: use of undeclared identifier 'j'".
#include <cs50.h>
#include <stdio.h>
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 = (8 - j); k < n; k++)
{
printf (".");
}
for (int j = (n - i); j < n; j++ )
{
printf("#");
}
printf("\n");
}
}