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

Thread: plz help me with this program.....i would be highly...obliged if i'm helped

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    1
    My Mood
    Bored
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default plz help me with this program.....i would be highly...obliged if i'm helped

    Plz help me with this program....its real urgent/.////..plz....plz

    1
    4 9
    16 25 36
    49 64 81 100


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    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.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Forum VIP
    Join Date
    Jun 2011
    Posts
    394
    My Mood
    Busy
    Thanks
    49
    Thanked 112 Times in 95 Posts
    Blog Entries
    5

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    public class WhatIsYourQuestion {
      public static void main(String[] args) {
        System.out.println("1");
        System.out.println("4 9");
        System.out.println("16 25 36");
        System.out.println("49 64 81 100");
      }
    }

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    I think he is asking us to find a relation with those numbers and to print those numbers using a nested for loop.

    =)

  5. #5
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    Quote Originally Posted by IAmHere View Post
    I think he is asking us to find a relation with those numbers and to print those numbers using a nested for loop.

    =)
    You can't leave things open to interpretation when you want quality replies. Thread starters need to write a clear, descriptive question. This is the kind of thread that gets left unanswered. People who want to help don't have time to chase clarification.
    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.

    Looking for a Java job? Visit - Java Programming Careers

  6. #6
    Forum VIP
    Join Date
    Jun 2011
    Posts
    394
    My Mood
    Busy
    Thanks
    49
    Thanked 112 Times in 95 Posts
    Blog Entries
    5

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    Quote Originally Posted by IAmHere View Post
    I think he is asking us to find a relation with those numbers and to print those numbers using a nested for loop.

    =)
    ...


    for (int i = 1; i < 11; i++) {
       int temp = i*i;
       System.out.println(temp);
    }

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,310
    Thanks
    56
    Thanked 2,373 Times in 2,344 Posts

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    What is the posted code supposed to do? Comments are useful here.
    How is it related to the OPs question?

  8. #8
    Forum VIP
    Join Date
    Jun 2011
    Posts
    394
    My Mood
    Busy
    Thanks
    49
    Thanked 112 Times in 95 Posts
    Blog Entries
    5

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    Quote Originally Posted by Norm View Post
    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

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,310
    Thanks
    56
    Thanked 2,373 Times in 2,344 Posts

    Default Re: plz help me with this program.....i would be highly...obliged if i'm helped

    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);
    }

Similar Threads

  1. Help with class program!!! STUCK! Program not doing what I Want!!!
    By sketch_flygirl in forum What's Wrong With My Code?
    Replies: 7
    Last Post: April 4th, 2011, 08:29 AM