Having worked on Mario many hours now, I have code that shows no errors, but when I print it the hashtags each show up in their own row and not with others.
The basic premise in pseudo code:
asks for height --> has row # --> amount of spaces is height-2 --> amount of # is height-spaces
What's missing in my code?
int main (void)
{
int height;
do
{
printf("How high should Mario climb?: ");
height = GetInt();
}
while (height > 23 || height < 0);
int i;
for (i = 0; i < height; i++)
{
int spaces;
for (spaces = height-2; spaces >=0; spaces--)
{
printf(" ");
int hash;
for (hash = height-spaces; hash <= height; hash++)
{
printf("#");
printf("\n");
}
}
}
}