Skip to content

Instantly share code, notes, and snippets.

@prefork
Created March 9, 2010 23:02
Show Gist options
  • Save prefork/327258 to your computer and use it in GitHub Desktop.
Save prefork/327258 to your computer and use it in GitHub Desktop.
PROGRAM example5
IMPLICIT NONE
REAL,DIMENSION(5):: v1, v2
REAL :: dot
INTEGER :: i
dot = 0
WRITE(*,*) 'Enter the first dataset:'
READ (*,*) v1
WRITE(*,*) 'Enter the second dataset:'
READ (*,*) v2
DO i = 1,5
dot = dot + (v1(i))*(v2(i))
END DO
101 FORMAT(X, 'The answer is', X, F9.5)
WRITE(*,101) dot
END PROGRAM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment