implicit double precision (a-h,o-z)
dimension A(3,3), B(3,3), C(3,3),D(3,3), E(3,3)
DATA A/1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0/
DATA B/1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0/
do i=1,3
do j=1,3
C(i,j)=A(i,j)+B(i,j)
D(i,j)=2*A(i,j)-3*A(i,j)
E(i,j)=A(i,1)*B(1,j)+A(i,2)*B(2,j)+A(i,3)*B(3,j)
enddo
enddo
write(*,*)C
write(*,*)D
write(*,*)E
stop
end
No comments:
Post a Comment