please give me a java codes to print this triangula shape using for loop...........
1
22
333
4444
55555

Recommended Answers

All 2 Replies

At least give it a try; what would be the point of *we* giving you *codes* if you don't end up learning anything new?

2 for loops. Use the System.out.print() method to print at the same line and System.out.println() to change lines. The index will tell you which number to print and how many times(inner loop)

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.