- 603 名前:デフォルトの名無しさん mailto:sage [2006/07/05(水) 20:05:21 ]
- できたおw
program hoge implicit none real, allocatable :: A(:,:), B(:,:), C(:,:) integer :: i,j, l,m,n read *, l, m, n allocate(A(l,m), B(m,n), C(l,n)) read *, ((A(i,j), j=1,m), i=1,l) read *, ((B(i,j), j=1,n), i=1,m) call seki(A, B, C, l, m, n) do i=1,l print *, (C(i,j), j=1,n) end do deallocate(A, B, C) stop contains subroutine seki(A,B,C, l,m,n) integer, intent(in) :: l,m,n real, intent(in) :: A(1:l,1:m), B(1:m,1:n) real, intent(out) :: C(1:l,1:n) C = MATMUL(A, B) end subroutine seki end program hoge
|

|