8
6 ,7
4 ,6 ,8
2 ,5 ,8 ,11
thanks for helpers
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.
8
6 ,7
4 ,6 ,8
2 ,5 ,8 ,11
thanks for helpers
Can you explain a little bit more about what you mean by "this shape"? If you want code that prints that exact output, what you probably want to do is make two for loops, inside of each other, so that one for loop prints all the values in an array, and then the outer for loop increments to the next array. The whole thing might be a bit easier if you know how to use a matrix, and if you don't, I think it would be simple enough to teach you!
I want this triangle to be the out output with no array just for loops
plz, can you right me a java code?
I try it hours but I didn't suceeded
Welcome to the forum!
Show what you've tried. Include any errors you're getting and would like help with or questions you have about your code and its results. A sample run is often helpful.
The problem is not the two for loops! The real issue is to evaluate if those numbers must be "calculated" or derived in some way.
Looking at those numbers I can "see" a relation between them (but I can't know for sure if it is really what was expected) ..... do you see?
Andrea, www.andbin.net SCJP 5 (91%) SCWCD 5 (94%)
Useful links for Java beginners My new project Java Examples on Google Code