I am stuck on how to build Mario's half-pyramid. I know that you can use a for loop to create the spaces and hashes. Whenever I try to execute the for loop, it doesn't print out the hashes or spaces. I'm not sure what I did wrong. Here is what I have so far:
int main(void)
{
do
{
printf("Height: ");
int i = GetInt( );
}
while (i < 0 || i > 23);
for (int i = 0; i < 10; i++);
{
printf(" ");
printf("#");
}
}
I followed the walkthrough about it and tried finding the pattern. I came up with n(line number)+2 for the hashes and i(height)-1 for the spaces. I'm not sure how to incorporate them.