Re: Math: pentagonal numbers
I'm not sure how to help you as there is no specific question anywhere in your initial post. You need to tell us specifically where your stuck. The more specific the question you can give us, usually the more specific the answer. Given your post above as it is just a reiteration of your requirements and some code, about all we can do is refer you to the Java tutorials.
Best of luck.
edit: also just so you know, I can't speak for the others, but this is a negative motivating factor for me: "don't understand it at all just want to pass the class". Personally, I get the most out of this site helping people who enjoy learning learn how to program in Java. I care little whether they pass this or that class, and care even less if they're not interested in programming. Again, that's just me. Again, best of luck.