
I need help with arrays QB
Quote:
>I need to know how to add up the rows and/or columbs of an array to
>come up with an average
>EXAPLE
> DIM a(60,60)
>how would I get average for the whole second row if I am using a(r,c)
>as my variables
OPTION BASE 1
DIM A(60,60)
Total = 0
FOR C = 1 TO 60
Total = Total + A(2,C)
NEXT
Average = Total / 60
- or -
OPTION BASE 0
DIM A(60,60)
Total = 0
FOR C = 0 TO 60
Total = Total + A(2,C)
NEXT
Average = Total / 61
--
Sun Valley Systems http://personal.bhm.bellsouth.net/~judmc
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."