    program main
    use myfuncts
    real c(100,100),avg,d(100)/100*0.8/
    data c(1:100,1) /100*9.0/
    data c(6:30,5:6)/50*0.25/ ! 50 elements
    call aver2d(c(2:30,4:8),avg)
    print *,"average=",avg
    call aver1d(d,avg1d)
    print *,"average 1d=",avg1d
    call aver1d(c(6:10,6),avg1d)
    print *,"average 1d=",avg1d
    read(*,*)
    end
    