Look at your program and try to think how it would print those numbers 2 times. Why does it happen every 5 numbers? Where in the loops is there a 5 used?
Look at the values of i and j in the loops.
Type: Posts; User: Norm
Look at your program and try to think how it would print those numbers 2 times. Why does it happen every 5 numbers? Where in the loops is there a 5 used?
Look at the values of i and j in the loops.
Check your logic and see where it is printing the number two times.
Print out the values of i and j as you go through the loops to make sure they are incrementing properly.
Play computer and step...
To keep the printed output on one line, use the print() method without any "\n" (new line) characters.
When you want the next output to go to a new line, use the println() method or add a "\n" at...
What does that output represent?
Can you add some comments that describe what those numbers mean.
Is that what you want or is there a problem with what is printed?
How do you want the numbers...