posted 16 years ago
it would also help, generally speaking, if you would explain what YOU think the output should be. Many people here will look at that and think "30 is exactly what I'd expect the output to be."
at that point, they then have to try and guess what you think the output should be, which can lead to all kinds of trouble.
if you say "Well, i think THIS should be the output, and here's WHY", it's much easier for someone to reply with "well, you make a false assumption HERE, and your logic is wrong THERE".
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors