ARRAYS2

 Program name: ARRAYS2

real :: A(4), B(4), c(4), D(4,4), E(4,4),F(4,4), G(4,4)

integer :: i

A=[1.,0.5,-3.,5.5]

B=(2*A)/3

c=B**2

D(1,:)=A

D(2,:)=(B*3)/2

D(3,:)=sqrt(C)

D(4,:)=A+B+C

E=D*3

print *, A

Print *,

Print *, B

print *,

Print *, C

print *,

do i=1,4

   print *, D(i,1), D(i,2), D(i,3), D(i,4)

end do

print *,

do i=1,4

   print *, E(i,1), E(i,2), E(i,3), E(i,4)

end do

print *,

print *, maxval(A), minval(B), product(C), sum(D), size(E)

print *,

F=transpose(E)

do i=1,4

   print *, F(i,1), F(i,2), F(i,3), F(i,4)

end do

print *,

print *, dot_product(A,B)

print *,

G=matmul(D,E)

do i=1,4

   print *, G(i,1), G(i,2), G(i,3), G(i,4)

end do

stop

end

Comentários

Postagens mais visitadas deste blog

RECURSIVE

HYDROGEN-RADIAL

RUNGE-KUTTA