0

im trying to print the pyramid but its not printing as expected

i dont understand what went wrong

the program works well when i compile and run it

how do i fix it?

this is my cs50chech result

:) mario.c exists

:) mario.c compiles

:) rejects a height of -1

:) handles a height of 0 correctly

:) handles a height of 1 correctly

:( handles a height of 2 correctly

\ expected output, but not "##\n###\n"

:( handles a height of 23 correctly

\ expected output, but not "##\n###\n####\n#####\n######\n#######\n..."

:( rejects a height of 24, and then accepts a height of 2

\ expected output, not an exit code of 0

:) rejects a non-numeric height of "foo"

:) rejects a non-numeric height of ""

2 Answers 2

1

From the spec recall that the output should look like this:

mario good

From the check50 output, your output probably looks like this:

mario bad

Without code, it would be nigh impossible to troubleshoot that, or this message:

:( rejects a height of 24, and then accepts a height of 2 \ expected output, not an exit code of 0

0

It is difficult to clear the doubt without the actual code so upload the code then I might be able to help you.

1
  • The issue is posting code in full for Academic Honesty as this is a public forum... Commented Jun 21, 2017 at 19:57

You must log in to answer this question.

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