Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
colums Need help!!
Rose Evans
Ranch Hand
Posts: 195
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can anyone tell me how you make columns to output in your program
I am trying to make something like this..
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
and so on.
)
)
)
)
Rose Evans
Ranch Hand
Posts: 195
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I meant to say columns...oops.
)
)
)
)
Sonny Gill
Ranch Hand
Posts: 1211
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
And what is the exact problem you are facing?
Just use two loops
int numCols = 5; int numRows = 3; int num = 0; for(int i=0;i<numRows;i++){ for(int j=0;j<numCols;j++){ System.out.print(num + " "); num++; } System.out.println(); }
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
OMG
Scrabble... it only takes a minute...
URGENT !
Initialization blocks in java
hello guy,add me of MSN please~~
More...