954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to display the following pattern?

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

anjal_pawar
Newbie Poster
4 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

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

BestJewSinceJC
Posting Maven
2,772 posts since Sep 2008
Reputation Points: 874
Solved Threads: 354
 

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.

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: