CE 311K Lab2

# CE 311K Lab2 - Lab2 Input/Output Commands Margaret Thompson...

This preview shows pages 1–3. Sign up to view the full content.

Lab2. Input/Output Commands Margaret Thompson Section No. 14885 01/22/08 1. SCREEN PRINT OUT

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

View Full Document
2. CODE ! ======================================================== ! CE311K Lab2 ! Simple 2X2 Matrices Operations ! 1/22/08 ! Programmed by Jung-Hwan Kwon ! Modified by Margaret Thompson ! ======================================================== Program Lab2 implicit none ! Declaration of variables real a11, a12, a21, a22 real b11, b12, b21, b22 real c11, c12, c21, c22 real ai11, ai12, ai21, ai22 real i11, i12, i21, i22 real det ! Open a data file Open (unit=6, file='lab2ex.dat', status='unknown') ! Input the elements of the two matrices (User inputs matrix data) Print *, 'Input the elements of the Matrix A' Print *, 'a11, a12, a21, a22?' Print *, 'Separate each element by space' Read *, a11, a12, a21, a22 Print *, 'Input the elements of the Matrix B' Print *, 'b11, b12, b21, b22?' Print *, 'Separate each element by space' Read *, b11, b12, b21, b22 ! Addition of the two matices c11 = a11 + b11 c12 = a12 + b12 c21 = a21 + b21 c22 = a22 + b22 Print 100
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/17/2008 for the course CE 311K taught by Professor Liljestrand during the Spring '08 term at University of Texas.

### Page1 / 7

CE 311K Lab2 - Lab2 Input/Output Commands Margaret Thompson...

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

View Full Document
Ask a homework question - tutors are online