Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Star Pattern

  1. #1
    Junior Member
    Join Date
    Jan 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Star Pattern

    For Homework guys /// Help Please

    Star Pattern
    Write a program that displays the following pattern:

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

    Output. Seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed by 5 stars, and the fourth consists just of 7 stars. The fifth line is identical to third, th sixth to the second and the seventh to the first.

    CLASS NAMES. Your program class should be called StarPattern

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Star Pattern

    What have you tried?
    Be sure to wrap any posted code in code tags.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member John Joe's Avatar
    Join Date
    Jun 2017
    Posts
    270
    My Mood
    Amused
    Thanks
    8
    Thanked 18 Times in 18 Posts

    Default Re: Star Pattern

    Your question look similiar to mine. Maybe you can get some idea on this
    http://www.javaprogrammingforums.com...ing-loops.html
    Whatever you are, be a good one

  4. #4

    Default Re: Star Pattern

    Pattern programme :

    c*** code removed
    Last edited by Norm; January 31st, 2018 at 06:56 AM. Reason: Please don't spoonfeed code

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Star Pattern

    @priya456 Please don't spoonfeed code.
    Read this: http://www.javaprogrammingforums.com...n-feeding.html
    If you don't understand my answer, don't ignore it, ask a question.

  6. The Following User Says Thank You to Norm For This Useful Post:

    BinaryDigit09 (February 6th, 2018)

Similar Threads

  1. Help with ASCII star shape
    By mprovinmeggan in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 3rd, 2014, 12:41 AM
  2. Star Loop
    By poldz123 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 27th, 2012, 03:00 PM
  3. Drawing a Star of David
    By tryingtolearn in forum AWT / Java Swing
    Replies: 2
    Last Post: July 31st, 2012, 07:01 PM
  4. star design programs
    By prasansani in forum Java Theory & Questions
    Replies: 6
    Last Post: September 20th, 2011, 12:42 PM
  5. Regular Expression pattern - complex pattern syntax
    By SmartAndy in forum Algorithms & Recursion
    Replies: 3
    Last Post: June 7th, 2011, 04:40 AM