My output is fine however
:( handles a height of 0 correctly \ expected an exit code of 0, not output of "Height: "
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.Sign up to join this community
Per the specs:
However, to make things more interesting, first prompt the user for the half-pyramid’s height, a non-negative integer no greater than 23.
So, non-negative means
height can be from
23 both inclusive.
So in case of an input 0, you should print a pyramid of 0 height, and
return 0. Not re-prompt for
Happy coding! :)