this is for the pset1 problem and my issue is with height = 1 or height 2, can someone please help!
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int height, lines, spaces, hashes;
// ask user for height of pyramid
do
{
printf("Height: ");
height = GetInt();
}
// height must be between 1 - 23
while (height < 0 || height > 23);
//print lines
for (lines = 1; lines <= height; lines++)
{
//print spaces
for (spaces = 1; spaces < (height - lines); spaces++)
{
printf(" ");
}
//print hashes
for (hashes = 1; hashes < lines; hashes++)
{
printf("#");
}
printf(" ");
printf("\n)");
}
return 0;
}