Write a program that accepts an integer "n" and prints the following picture of a diamond with 2n-1 rows
Number #3:
photo (1).JPG
I really need help with this i have no idea where to start.
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.
Write a program that accepts an integer "n" and prints the following picture of a diamond with 2n-1 rows
Number #3:
photo (1).JPG
I really need help with this i have no idea where to start.
Don't worry about the whole problem, just work on smaller parts and build upon. Can you write code to produce:
If so then you are half way there. All you need to do after that is to repeat the pattern but upside down. Depending upon how you wrote the program you might end up with 2 middle lines. If so then work out how to eliminate one.X XXX XXXXX
Improving the world one idiot at a time!
Start with a piece of paper (graph paper would work well). Write down the all the X's for 3 or 4 lines. Then count how many X's and how many spaces are on each line. Do you see a pattern?
Improving the world one idiot at a time!