i wrote my mario.c programm and I am happy that it works. Well it actually prints a half pyramid. But it supposed to print the half pyramid from the left bottom corner up to the right upper corner. Well mine is the other way around. According to the walkthrough I am supposed to use spaces. Well the problem now happens to be that I have no clue where to put those spaces. Do I maybe use an extra for loop or include in in the excisting for loop. I tried various things but it never quite turns out the way I want it... Maybe someone has an idea? here my code:
include
include
int main(void)
{ int i,l,h; do { printf("state pyramid height: "); i = GetInt(); } while ( i <= 0 && i > 23 );
for (l = 0; l <= i ; l++)
{
for (h = 0; h <=(l+1); h++)
{
printf(" #");
}
printf("\n");
}
return 0;
}