Plz help me with this program....its real urgent/.////..plz....plz
1
4 9
16 25 36
49 64 81 100
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.
Plz help me with this program....its real urgent/.////..plz....plz
1
4 9
16 25 36
49 64 81 100
Help you with what program? What kind of an answer do you expect to get from this?
You need to give a better description of your problem and what you are trying to achieve.
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
I think he is asking us to find a relation with those numbers and to print those numbers using a nested for loop.
=)
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.
...
for (int i = 1; i < 11; i++) { int temp = i*i; System.out.println(temp); }
What is the posted code supposed to do? Comments are useful here.
How is it related to the OPs question?
Question: 1 4 9 16 25 36 49 64 81 100
My answer:
for (int i = 1; i < 11; i++) { int temp = i*i; System.out.println(temp); }
Comments:
1x1 = 1
2x2 = 4
3x3 = 9
4x4 = 16
5x5 = 25
6x6 = 36
7x7 = 49
8x8 = 64
9x9 = 81
10x10 = 100
for i = 1..10 print i*i
How is it related to the OPs question?
// Print out the squares of 1 to 10, one on each line for (int i = 1; i < 11; i++) { System.out.println(i*i); }