I spent the past 4 hours working on cs50 pset 1 about the Mario pyramid. I made progress, but I can't figure out what's wrong with my code.
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int s;
do
{
printf("height: ");
s = GetInt();
}
while(s < 0 || s > 23);
for(int i = 0; i < s; i++)
{
for(int i = s - 1; i < s; i++)
{
printf(" ");
}
for(int i = 1; i + 1 < s; i--)
{
printf("#");
for(int i = 0; i + 1< s ; i++)
{
printf("#");
}
}
printf("\n");
}
}