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 4 of 4

Thread: Help please??

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Help please??

    I'm doing a project for my computer science class and I am printing a cake out using ASCII symbols. Running it will let you choose between having 25, 11, 5, 3, or 1 candle(s) on the cake, like this, respectively:
    " ___|||||||||||||||||||||||||___ "
    " __________|||||||||||__________ "
    " _____________|||||_____________ "
    " ______________|||______________ "
    " _______________|_______________ "

    I need some help on how to print these lines using loops.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Help please??

    What have you tried? What problems are you having?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Help please??

    I haven't really tried anything yet. I'm still pretty new to programming and I don't really know where to start

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Help please??

    If you don't know how to write a loop, take a look at the tutorial: The for Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)

    The program needs to print several lines (use a loop to control the number of lines)
    and it needs to print different characters on each line (use a loop for each different character)
    If you don't understand my answer, don't ignore it, ask a question.

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

    smiththesailor (December 15th, 2013)

Tags for this Thread