CLS
RANDOMIZE TIMER
INPUT n, m
DIM a(n, m + 1)
FOR i = 1 TO n
a(i, m + 1) = 0
FOR j = 1 TO m
a(i, j) = INT(RND * 10)
IF a(i, j) > a(i, m + 1) THEN a(i, m + 1) = a(i, j)
PRINT a(i, j);
NEXT j: PRINT
NEXT i: PRINT
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j) + a(i, m + 1);
NEXT j: PRINT
NEXT i: PRINT