On line no 1 there are 1 star
On line no 2 there are 3 stars
On line no 3 there are 5 stars
On line no 4 there are 3 stars
On line no 4 there are 3 stars
On line no 5 there are 1 stars

*
***
*****
***
*

on first and fifth line the single star appears in the middle of the 3 stars

Recommended Answers

All 2 Replies

Use System.out.print, '*'s and '\n'

In this thread you ask the same question:
http://www.daniweb.com/forums/thread274702.html

An answer has been given to your question. Don't go around making new threads with the same question. NO one is going to write the code for you no matter how many thread you start.

You have been given suggestions; now post some code, make an effort.

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.