Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Printing 10 Numbers per row, then adding new row and printing next 10
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
EricUnreal




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: 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.
Velocity




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: