CE 311K Lab7

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

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

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)

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

View Full Document
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

## 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 / 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
Ask a homework question - tutors are online