My prompt and validation works already. The program compiled. But when I run it and enter a valid height, it does nothing. It seems like my loops don't execute. Now I have changed a few things to improve but get the compilation error that my counter i is undefined even though I declare it in the for statement. And since the number of spaces I need is defined by the counted, spaces does not get declared either. What is wrong? Here is that part of the code
for (int i=0;i==height; i++)
/* final number of spaces and hashs to target */
int spaces=i;
int hashs=height -i;
{
for (int j=0;j==spaces;j++)
{ printf(" "); }
for (int k=0;k==hashs;k++)
{ printf("#"); }
printf("#\n");
}