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

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

View Full Document Right Arrow Icon
Lab2. Input/Output Commands Margaret Thompson Section No. 14885 01/22/08 1. SCREEN PRINT OUT
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

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

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

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