0

enter image description here

:) mario.c exists. :( mario.c compiles. expected exit code 0, not 1 :| rejects a height of -1 can't check until a frown turns upside down :| handles a height of 0 correctly can't check until a frown turns upside down :| handles a height of 1 correctly can't check until a frown turns upside down :| handles a height of 2 correctly can't check until a frown turns upside down :| handles a height of 23 correctly can't check until a frown turns upside down :| rejects a height of 24, and then accepts a height of 2 can't check until a frown turns upside down :| rejects a non-numeric height of "foo" can't check until a frown turns upside down :| rejects a non-numeric height of "" can't check until a frown turns upside down See https://cs50.me/checks/bf22d4b4b31d715b857d88889f416b00fa3d8c01 for more detail.

^what shows when I type check50

  • In the future, when posting code, please don't use screen shots. The code can't be cut and pasted for testing and nobody wants to transcribe code. Instead, cut and paste your code into the question, highlight it, and click on the curly braces { } above the entry window to format as code. – Cliff B Jan 24 '18 at 22:26
2

Simply put, the code doesn't compile, so none of the other tests can be done by check50.

Did you actually compile your code and run it first, or did you go straight to check50? The code needs to be compiled, tested, and debugged before checking with check50. You need to do this for a number of reasons. The code needs to actually compile, but more importantly, you need to learn to debug code, starting with fixing syntax errors.

As for why it doesn't compile, here's a hint: What is the correct syntax for a for loop?

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .