I've been struggling for days trying to get my mario pyramids to pass the check but I can't seem to get it to work.
// I will be declaring my variables here
int Height;
int space;
int dash;
// I'm going to prompt user for an integer. Only integers from 0 to 23
do
{
printf("height:");
Height = get_int();
}
while (Height <= 0 || Height >= 23);
// Here is the loop that will create the number of spaces for which the dashes are located from the left side of the screen
for (int i = 0; i < Height; i++)
{
for (space = (Height - i); space >0; space--)
{
printf(" ");
}
// Here is a 'for' loop used to determine the number of dashes
for (dash = 0; dash <= (i+1); dash++)
{
printf("#");
}
printf("\n");
}
I've just about had it with this. Any help would be much appreciated