Results 1 to 5 of 5
  1. #1
    sanjustified is offline Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    0

    Default Hello guys,, can anybody help me create this star pattern.

    Hello guys,, can anybody help me create this star pattern.-s.jpg







    help me create the star pattern shown in image please :)
    Attached Thumbnails Attached Thumbnails Hello guys,, can anybody help me create this star pattern.-star.jpg  
    Last edited by sanjustified; 11-23-2011 at 06:11 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,307
    Rep Power
    25

    Default Re: Hello guys,, can anybody help me create this star pattern.

    You'll need one or more loops to print this pattern.
    Look at the pattern of where spaces are printed and where *s are printed on each row.
    How many spaces on the first row?
    How many spaces on the second row?
    etc to the last row
    How is the row number related to the number of spaces printed on a row?

  3. #3
    sanjustified is offline Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    0

    Default Re: Hello guys,, can anybody help me create this star pattern.

    no space on first row and then 1 space each as the stars progress....

  4. #4
    sanjustified is offline Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    0

    Default Re: Hello guys,, can anybody help me create this star pattern.

    can u show me the sample of the loop please..

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,307
    Rep Power
    25

    Default Re: Hello guys,, can anybody help me create this star pattern.

    Do you know how to write a for loop? This must be covered in every language textbook and tutorial.
    Go to this site and Search for "For"
    Trail: Learning the Java Language: Table of Contents (The Java™ Tutorials)

    One loop will take the row number and use it to control how many print statements you execute.
    Each print(" ") will print one space.

Similar Threads

  1. Star pattern help?
    By GeeKunMow in forum New To Java
    Replies: 13
    Last Post: 07-21-2011, 05:59 AM
  2. How to mirror Star Pattern
    By andypatel00 in forum New To Java
    Replies: 10
    Last Post: 04-04-2011, 03:50 AM
  3. Star triangle pattern
    By crazy4fun in forum New To Java
    Replies: 7
    Last Post: 03-06-2011, 01:03 PM
  4. intricate star pattern
    By aamster in forum New To Java
    Replies: 7
    Last Post: 10-11-2009, 06:50 AM
  5. Recursive Star Pattern HELP PLEASE!!
    By ITnewbie in forum New To Java
    Replies: 1
    Last Post: 09-25-2009, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •