Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

6
[Java] Having trouble finishing one of the Daily Programming challenges. Output isn't right, and I can't figure out how to fix it.
Author Summary
db2765 is in Java
Post Body

This is the challenge I'm stuck on: http://www.reddit.com/r/dailyprogrammer/comments/1f7qp5/052813_challenge_127_easy_mccarthy_91_function/

I have the program working, and it figures out all the steps just fine. The issue is that my final output lines aren't right. The output they want just prints out the answer for the final line, and not the step for that number, like the previous ones. I just can't figure out how to make the program know when it's on the final step, though.

Also, how's the commenting and code look? Any red flags? I've been teaching myself, and don't have a lot of time under my belt yet, so I want to make sure I'm doing everything right.

Here's the code: http://pastebin.com/kPy6SPWK

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,160
Link Karma
2,165
Comment Karma
2,995
Profile updated: 3 days ago
Posts updated: 2 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
11 years ago