Lab06_CFU_rfelde - program implicit none real,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
! Lab #6: Format Descriptors, Functions and Subroutines ! File: Lab06_CFU_rfelde.f95 ! Date: 14 February 2008 ! By: Ryan Robert Felde ! rfelde ! Section: 02/01, 11:30, and ENAD 138 ! Team: 16 ! ! ELECTRONIC SIGNATURE ! Ryan Robert Felde ! ! The electronic signature above indicates the program submitted for ! evaluation is my individual work and I have a general understanding ! of all aspects of its development and execution. ! ! A BRIEF DESCRIPTION OF WHAT THE PROGRAM OR FUNCTION DOES
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: program implicit none real, dimension(10,3) :: Array1 real, dimension(10,3) :: Array2 real :: Dst, D read(*,*)Array1 read(*,*)Array2 write(*,10)D 10 format('Distance =', f8.2) stop end program function Dst(Array1, Array2) real, intent(in) :: Array1, Array2 integer :: I real :: D do I = 1, 10 D = sqrt((Array2(1:I)-Array1(1:I))**2)+((Array2(2:I)-Array1(2:I))**2)+& ((Array2(3:I)-Array1(3:I))**2)) end do end function Dst...
View Full Document

This note was uploaded on 10/05/2009 for the course ENGR 117 taught by Professor Staff during the Spring '08 term at Purdue University-West Lafayette.

Ask a homework question - tutors are online