SUBROUTINE

 !Program name: SUBROUTINE

!Building a 3x3 matrix and its transpose

  INTEGER*4 F(3,3),FT(3,3)

  Do 1 J=1,3

  Do 1 I=1,3

     F(I,J)=(5*I)+(7*J)

     Print *, F(I,J)

1 continue

  Print *, 'Matrix F 3x3 (5i+7j): '

  Print *, F(1,1),F(1,2),F(1,3)

  Print *, F(2,1),F(2,2),F(2,3)

  Print *, F(3,1),F(3,2),F(3,3)

  Call MATRNS(F,FT)

  Print *, 'Matrix transpose FT 3x3 (5j+7i): '

  Print *, FT(1,1),FT(1,2),FT(1,3)

  Print *, FT(2,1),FT(2,2),FT(2,3)

  Print *, FT(3,1),FT(3,2),FT(3,3)

  stop

  end

 

  Subroutine MATRNS(F,FT)

  Integer*4 F(3,3),FT(3,3)

  Do 2 J=1,3

  Do 2 I=1,3

     FT(J,I)= F(I,J)

2 continue

  return

  end

Comentários

Postagens mais visitadas deste blog

RECURSIVE

HYDROGEN-RADIAL

RUNGE-KUTTA