Thread locked. Duplicate of http://www.javaprogrammingforums.com/whats-wrong-my-code/17145-i-have-question-about-creating-pyramid-numbers.html

Please read the forum rules.