Hi Friends, this is my new program which read a matrix and then total its rows and columns and overall of matrix. Here is the program
Dim Mat(3,3)
for a = 1 to 3
for b = 1 to 3
read No
TotalMat = TotalMat + No
Mat(a,b) = No
next b
next a
for a = 1 to 3
for b = 1 to 3
print Mat(a,b),
sum = sum + Mat(a,b)
if b = 3 then
print sum
print
sum = 0
end if
next b
next a
for b = 1 to 3
for a = 1 to 3
sum = sum + Mat(a,b)
if a = 3 then
print sum,
sum = 0
end if
next a
next b
print TotalMat
Data 1,2,2,3,2,1,5,2,9
Please comment on it, because I have used it after a long time and importantly, I have written this program in Liberty Basic neither Quick Basic nor QB64. Please try it in these and then tell me.