program ex0707
implicit none
integer, parameter :: row = 3
integer, parameter :: col = 2
integer :: m(row, col)
integer r
integer c
data((m(r, c),r=1,2,3),c=1,2)/10,20,30,40,50,60/
write(*, "(i3, i3, /,i3, i3, /, i3, i3)")((m(r, c), c=1,2),r=1,2,3)
stop
end
program ex0707
implicit none
integer, parameter :: row = 3, col = 2
integer :: m(row, col)
integer r, c
m = reshape([10,20,30,40,50,60],[row,col])
write(*, "(2i3)") ((m(r, c), c=1,2),r=1,3)
read(*,*)
end
fcode 发表于 2018-6-6 08:31
恭喜你,学到新东西了
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |