Printing 10 Numbers per row, then adding new row and printing next 10
Author |
Message |
EricUnreal
|
Posted: Fri Jan 27, 2012 12:06 am Post subject: Printing 10 Numbers per row, then adding new row and printing next 10 |
|
|
Hey I want to print 10 integers and then make a new line? How would I go about this? it gives me an error when i use the "%".
Here's my method.
Displays the cube tosses, 10 per row, on the terminal window
*/
public void displayTosses(int[] tosses)
{
//some sort of System.out.println(); here
}
Thanks in advance |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Fri Jan 27, 2012 9:04 am Post subject: RE:Printing 10 Numbers per row, then adding new row and printing next 10 |
|
|
How do you print something ten times?
You can use some creative nested loops, or you can apply the pigeonhole principle. |
|
|
|
|
![](images/spacer.gif) |
Velocity
![](http://compsci.ca/v3/uploads/user_avatars/1809397984eb9e2888e99b.jpg)
|
Posted: Fri Feb 10, 2012 10:42 am Post subject: RE:Printing 10 Numbers per row, then adding new row and printing next 10 |
|
|
yea as insectoid said just make a loop with an if statement that says when this number exceeds 10 then \new line and have it look over and over agian, and add a delay time to see it recreate slowly. whats ur compiler |
|
|
|
|
![](images/spacer.gif) |
|
|