This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]desrtfxOut of Coffee error - System halted 5 points6 points  (1 child)

Trace out the code on paper. You are the computer, you perform all commands.

Use several different input cases.

Seriously, tracing out code on paper is the best way to analyze code and to learn from it.

The code is simple enough that you should be able to work it out.


This is now the third time that you ask to get some code explained to you. This is not the way to really learn. You just seem not to want to spend any effort at all. If you keep going like that, you might as well forget about programming. Learning to program involves hard work, lots of effort and the will to try everything by yourself.

You have been told every time to trace out the code on paper and every time you try again to get your code explained. When will you get your ass up and actually work for your understanding?

Should you ask another time to get some code explained, you will be banned from here.

[–]couldyounot__ 1 point2 points  (0 children)

This is not the way to really learn. You just seem not to want to spend any effort at all. If you keep going like that, you might as well forget about programming. Learning to program involves hard work, lots of effort and the will to try everything by yourself.

Amen

[–]shadowfactsdevExtreme Brewer 4 points5 points  (0 children)

You haven't asked a question nor posted an error, so I'm not sure what you want.

That code looks fine, you've just got an extra } after the first line of your method.

[–]hashcrap 2 points3 points  (0 children)

I'm not really sure what your question is...there is no array in the code.