fortran题矩阵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(i,j),i=1,M),j=1,N)100 FORMAT((F5.1,2X))end
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/26 20:15:26
fortran题矩阵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(i,j),i=1,M),j=1,N)100 FORMAT((F5.1,2X))end
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
fortran题矩阵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(i,j),i=1,M),j=1,N)100 FORMAT((F5.1,2X))end
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