Please can someone assist me! I have been stuck on this for a few hours. I can't seem to make the "#" print and loop to resemble a pyramid.
I tried many different ways I could figure out but no success. Your time and help will be appreciated!
My code:
include
include
int get_positive_int(void);
int main(void)
{ int i = get_positive_int(); printf("%i\n", i); }
// Prompt user for positive integer
int get_positive_int(void) { int b; do { b = get_int("Height: ");
}
while (b > 7);
for (int i = 1; i <= 7 ; i++)
{
printf("%d\n", b);
b++;
}
return b;
}