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: How do I write these two pyramids in Java?

  1. #1
    Junior Member
    Join Date
    May 2019
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How do I write these two pyramids in Java?

    Hello, I am a java newbie. Can someone please show me how to write the code for the pyramids in the attached picture?

    Thanks

    pattern.jpg
    Last edited by bkw4; May 2nd, 2019 at 10:30 PM.

  2. #2
    Junior Member
    Join Date
    Apr 2019
    Posts
    25
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: How do I write these two pyramids in Java?

    en.verejava.com/?id=19989480121243

    Pyramids

    1    
    1    2    
    1    2    3    
    1    2    3    4    
    1    2    3    4    5    
    1    2    3    4    5    6    
    --------------------------------
    1    2    3    4    5    6    
         1    2    3    4    5    
              1    2    3    4    
                   1    2    3    
                        1    2    
                             1

  3. The Following User Says Thank You to veretimothy For This Useful Post:

    bkw4 (May 3rd, 2019)

  4. #3
    Junior Member
    Join Date
    May 2019
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: How do I write these two pyramids in Java?

    Quote Originally Posted by veretimothy View Post
    en.verejava.com/?id=19989480121243

    Pyramids

    1    
    1    2    
    1    2    3    
    1    2    3    4    
    1    2    3    4    5    
    1    2    3    4    5    6    
    --------------------------------
    1    2    3    4    5    6    
         1    2    3    4    5    
              1    2    3    4    
                   1    2    3    
                        1    2    
                             1
    Man, thank you so much!

    I spent an embarrassingly amount of time on this (hours). I was able to do the top pyramid but the bottom I couldn't figure out.

  5. #4
    Member
    Join Date
    Sep 2018
    Location
    Virginia
    Posts
    284
    My Mood
    Cool
    Thanks
    0
    Thanked 38 Times in 36 Posts

    Default Re: How do I write these two pyramids in Java?

    Please read this: http://www.javaprogrammingforums.com...n-feeding.html

    Regards,
    Jim

Similar Threads

  1. Replies: 15
    Last Post: May 2nd, 2013, 05:29 AM
  2. Replies: 2
    Last Post: January 25th, 2013, 09:54 PM
  3. Creating number Pyramids with For Loops
    By Staticity in forum Loops & Control Statements
    Replies: 3
    Last Post: October 2nd, 2011, 05:20 PM
  4. Creating pyramids with for loops
    By jericajam in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 4th, 2011, 06:56 AM