Created
March 9, 2010 23:02
-
-
Save natebenes/327258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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