Fortran 编小程序

2024-11-28 07:39:48
推荐回答(2个)
回答1:

program main
implicit none
integer a(3,3) !// 是的,就是这样
integer row
integer col
do row = 1,3
do col = 1,3
a( col , row ) = row * 3 - 3 + col
end do
end do
write(*,*) a
end

回答2:

1)write (*, 100) ( ( a(i , j) ,j=1,3) i=1,3)
100 format (1x 3I4)
2) do row = 1,3
do col = 1,3
write (*,'1xI4') a(row,col)
end do

end do