part1b - DO i=1,2 WRITE matrix1(i,1:2 matrix2(i,1:2 END...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
PROGRAM part1b IMPLICIT NONE REAL:: matrix1(2,2), matrix2(2,2) INTEGER::i,j WRITE(*,*) "Enter four real values into the first 2x2 matrix:" DO i=1,2 READ(*,*) matrix1(i,1:2) END DO WRITE(*,*) "Enter four more real values into the second 2x2 matrix:" DO i=1,2 READ(*,*) matrix2(i,1:2) END DO WRITE(*,*) "Your first matrix is:" DO i=1,2 WRITE(*,*) matrix1(1:2,i) END DO WRITE(*,*) "Your second matrix is:" DO i=1,2 WRITE(*,*) matrix2(1:2,i) END DO !Matrix addition WRITE(*,*) WRITE(*,*) "Matrix1 + Matrix2 is:"
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DO i=1,2 WRITE(*,*) matrix1(i,1:2)+matrix2(i,1:2) END DO !Difference WRITE(*,*) WRITE(*,*) "Matrix1 - Matrix2 is:" DO i=1,2 WRITE(*,*) matrix1(i,1:2)-matrix2(i,1:2) END DO !Product WRITE(*,*) WRITE(*,*) "Matrix1 * Matrix2 is:" DO i=1,2 DO j=1,2 WRITE(*,*) matrix1(i,j)*matrix2(i,j) END DO END DO !Quotient WRITE(*,*) WRITE(*,*) "Matrix1 / Matrix2 is:" DO i=1,2 DO j=1,2 WRITE(*,*) matrix1(i,j)/matrix2(i,j) END DO END DO END PROGRAM...
View Full Document

This note was uploaded on 07/22/2010 for the course MAE 112 taught by Professor Freeh during the Spring '10 term at North Country Community College.

Page1 / 2

part1b - DO i=1,2 WRITE matrix1(i,1:2 matrix2(i,1:2 END...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online