how to add elements in 2D array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svpriyan
    New Member
    • Apr 2009
    • 18

    #1

    how to add elements in 2D array

    I have the inputs to the 2D array,


    n will be given every time as an input

    Code:
    prod id =n
    for( row=0;row<10;row++) {              	
                	year2007[n][row] =  tot;
                   }
    when i run the display method
    i dont get the
    coulmn number ? any 1 helps me
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by svpriyan
    I have the inputs to the 2D array,


    n will be given every time as an input

    Code:
    prod id =n
    for( row=0;row<10;row++) {              	
                	year2007[n][row] =  tot;
                   }
    when i run the display method
    i dont get the
    coulmn number ? any 1 helps me
    I don't really understand your question; from what I can see from your code example you set ten elements of row 'n' to the value 'tot'.

    kind regards,

    Jos

    Comment

    Working...