I am currently working on pset1 Mario, less comfortable. I am running my c to turn the hashtags into a staircase, but when I run the code, it is only a block. What is wrong with my code? Thank you all for helping me out and have a fantastic day.
#include <cs50.h>
#include <stdio.h>
// Function that makes the pyramid
int main(void)
{
// Declares the variable
int n = -100;
// Do loop gets the height of the pyramid
do
{
n = get_int("How many blocks tall do you want your pyramid to be? ");
}
// Ensures that the number for the pyramid isn't less than 0 or greater than 23
while (n < 0 || n >= 23);
// Rows
for (int i = n; i > 0; i) {
printf("#");
// Columns
for (int j = 0; j < n; j++) {
printf("#");
}
printf("\n");
}
}