fortran题矩阵

问题描述:

fortran题矩阵
program ddc
parameter(M=5,N=5)
integer i,j
real:A(M,N)
A=Reshape((/12,40,20,18,11,25,17,50,30,45,24,16,14,54,15,48,20,10,38,28,52,19,28,35,42/),(/5,5/))
print*,"原矩阵:"
write(*,100) ((A(i,j),i=1,M),j=1,N)
100 FORMAT((F5.1,2X))
end

program ddcparameter(M=5,N=5)integer i,jreal::A(M,N) !// 此处两个冒号A=Reshape((/12,40,20,18,11,25,17,50,30,45,24,16,14,54,15,48,20,10,38,28,52,19,28,35,42/),(/5,5/))print*,"原矩阵:"write(*,100) ((A(...