CE 311K Lab7 - Write(6'When x = x Write(6'F(x = result...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 ! CE311K Introduction to Computer Methods ! Lab 7 ! Functions and Subroutines ! Programmed by Margaret Thompson ! 2/26/2008 Program fx implicit none real k, d, l, result, x, F k= .002 d= 1e-6 l= 100e-6 Open (unit=6, file='output.txt', status='unknown') Print *,' Input first x value' Read *, x result=F(x,k,d,l) Write (6,*) 'When x =', x Write (6,*) 'F(x) =', result Print *,' Input second x value' Read *, x result=F(x,k,d,l)
Background image of page 1

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

View Full Document Right 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: Write (6,*) 'When x =', x Write (6,*) 'F(x) =', result Print *,' Input third x value' Read *, x result=F(x,k,d,l) Write (6,*) 'When x =', x Write (6,*) 'F(x) =', result Print *,' Input fourth x value' Read *, x result=F(x,k,d,l) Write (6,*) 'When x =', x Write (6,*) 'F(x) =', result End real Function F(x,k,d,l) real x,k,d,l F=(x*(TAN(x*l)))-(k/d) Sheet1 Page 2 Return End...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

CE 311K Lab7 - Write(6'When x = x Write(6'F(x = result...

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