You have put a break once your count reaches 0. So only one set of numbers is printed. You can have another counter whic can be initialised to 5 and decfremented every time you print a "--------------". Then break the for loop only when this new counter becomes zero.(Put another if condition for that.)
Hi ali, If you put a println statment below your number generator I think it may help you to see the reason why you are getting duplicate numbers , just ponder on what the second test in the first if statement is trying to achieve.
an island in the sun <br />with a language of many tongue?
Joined: Mar 01, 2002
Problem resolved, Swati thanks for the help.
Daniel: riddles are not for forums. you should be more helpful. the duplication occurs as all 5 numbers must be compared not just the previous one, as told in the sun forums
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com