part1c - point?" READ(*,*)x2, y2, z2 distance =

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

View Full Document Right Arrow Icon
PROGRAM part1c IMPLICIT NONE REAL::x1, y1, z1, x2, y2, z2, distance, diff WRITE(*,'(A)',ADVANCE="NO")"What are the x,y and z coordinates of your first point?" READ(*,*)x1, y1, z1 WRITE(*,'(A)',ADVANCE="NO")"What are the x,y and z coordinates of your second
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: point?" READ(*,*)x2, y2, z2 distance = SQRT(diff(x1,x2)*diff(y1,y2)*diff(z1,z2)) WRITE(*,*)"The distance between your two points is ",distance END PROGRAM REAL FUNCTION diff(a,b) IMPLICIT NONE REAL,INTENT(IN)::a,b diff = (b-a)**2 END FUNCTION...
View Full Document

This note was uploaded on 07/22/2010 for the course MAE 112 taught by Professor Freeh during the Spring '10 term at North Country Community College.

Ask a homework question - tutors are online