INPUT(m,n)
DIM a(m,n)
FOR i=1 TO m
FOR j=1 TO n
INPUT a(i,j)
NEXT
NEXT
FOR i=1 TO m
FOR j=1 TO n
s=s+a(i,j)
NEXT
NEXT
PRINT s
INPUT(m,n)
DIM a(m,n)
FOR i=1 TO m
FOR j=1 TO n
INPUT a(i,j)
NEXT
NEXT
FOR i=1 TO m
FOR j=1 TO n
s=s+a(i,j)
NEXT
NEXT
PRINT s