help regarding nested FOR loop programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhu50
    New Member
    • Jun 2007
    • 20

    #1

    help regarding nested FOR loop programming

    hi to all of you,

    i whave program in which i have to display following results using nested for loops :-


    1
    2 3
    4 5 6
    7 8 9 10
    11 12 13 14
    15 16 17 18 19

    i m learning java so plz help me if anyone know how to code program to display this result using only nested FOR loops

    thankz in advance,,,,,,,,
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by abhu50
    hi to all of you,

    i whave program in which i have to display following results using nested for loops :-


    1
    2 3
    4 5 6
    7 8 9 10
    11 12 13 14
    15 16 17 18 19

    i m learning java so plz help me if anyone know how to code program to display this result using only nested FOR loops

    thankz in advance,,,,,,,,
    Are you sure that's the figure? Shouldn't that be:

    1 <--- 1 number
    2 3 <--- 2 numbers
    4 5 6 <--- 3 numbers
    7 8 9 10 <--- 4 number
    11 12 13 14 15 <--- 5 numbers
    16 17 18 19 20 21 <--- 6 numbers etc.

    kind regards,

    Jos

    Comment

    • abhu50
      New Member
      • Jun 2007
      • 20

      #3
      ya i m defintinely sure dude !!!!!!!
      it is correct if anyone know it's coding then try to telll me
      thankz

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by abhu50
        ya i m defintinely sure dude !!!!!!!
        it is correct if anyone know it's coding then try to telll me
        thankz
        So you want 1, 2, 3, 4, 4 and 5 numbers in each row? And btw, noone is going
        to give you "it's coding" here; click the 'help' link near the top right corner of this
        page and read the forum policies.

        kind regards,

        Jos

        Comment

        Working...