2 dimensional array addittion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • macy
    New Member
    • Mar 2010
    • 1

    2 dimensional array addittion

    how can i add a 3x3 array and output its sum by row and by column.,
    the input must not be declared, it must be random.
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Take a look at Arrays Revealed.

    Comment

    • whodgson
      Contributor
      • Jan 2007
      • 542

      #3
      Yes now that you have digested that:
      Do it by entering your own 9 digits using two for loops the second nested under the first. The sum of the first row when i=0 is j[0]+j[1]+j[2].
      The sum of the first column when j=0 is i[0]+i[1]+i[2].
      Now you can substitute you array elements with random integers in some range to comply with the rest of the question.

      Comment

      Working...