I am hard up creating a nested loop for this one. can someone help me.Thanks.
Output:
181614121
27252321
3634323
454341
54525
6361
772
81
9

Recommended Answers

All 6 Replies

What is there about the output that makes you think you need a nested loop?
You can generate that print out with a single call to println by using \n characters to put the next String on the next line.

i was actually given the task to do it using loops...

How many loops? What are each of the loops supposed to do?

atmost 3 loops...

Have you tried any code?If so, please post.

Are those numbers random, or is there a pattern I can't see?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.