Okay, so this is a bit of a tire fire. Let's start analyzing this one.
First of all, the question states that they're not getting the expected output. However, it's not immediately clear what their output is, or how it relates to their expected output - for example, their expected output goes up to 30, but the loop contains values up to 100. This makes it an ideal candidate to be flagged for closure as "why isn't this code working", since they're still missing a few key details.
Second, the answers on this are abysmal. Not a single one goes into any detail to explain what the actual problem is, which makes the quality of these answers just...terrible. There's no flag to deal with terrible answers; chiefly, the only reason you'd flag an answer is to declare it as spam, not an answer, or something that you think a moderator should genuinely look into - and poor quality ain't one of those things.
The only real recourse you have for a question/answer set like this:
- Downvote liberally.
- Flag the question for closure as, "Why doesn't this code work?"
- Downvote the really terrible code-only answers.
- Then, move on with your life.
After you've done your due diligence, the system will take care of the rest.