Getting error on cs50 problem set 1 Mario "handles a height of 1 correctly, timed out while waiting for program to exit"
Here's my code:
#include <stdio.h>
#include <cs50.h>
int main(void) { // to get the positive integer int height;
do
{
height = get_int(" Height: ");
height -= 1;
}
while (height <1 || height > 7);
//building block of super mario
//it is for tracking the height and width
for (int i = 0; i <= height; i++)
{
//it is for traking spaces
for (int k = height; k > i; k--)
{
printf(" ");
}
// it is for tracking hashes
for (int j = 0; j <= i; j++)
{
printf("#");
}
printf("\n");
}
}