So I'm working on mario less and running into a road block. I got it to output the space and rows and columns but it's upside down, backwards and not the right number of spaces exactly. Like if you input 4 its:
###
#
The code is this:
# include <stdio.h>
#include <cs50.h>
//prompt user for half- pyrimid height
// create blocks and right align them
int main(void)
{
int height;
do
{
height = get_int ("Input postive number between 1 and 23: ");
}
while (height < 0 || height > 23);
// add spaces and rows
for (int i = 1; i <= height; i++)
{
height -= i;
printf (" ");
// add hashtags and columns
for (int n = 0; n < height; n++)
printf ("#");
printf ("\n");
}
}