# Fortran: Lesson 7

#1 #2 #3
#1 #2 #3

#### Demo 3

								        program addthem
c       This program reads a list of numbers from a file named
c       "numbers", and computes the sum of the numbers.
c       each number in the file must appear on its own line.
c       The "go to" loop terminates when the end of the file is
c       reached - the program then prints the sum and ends.
c       As no drive letter is given, the file "numbers" must
c       reside in the directory from where Fortran is running.
real x, sum
open (unit=1,file="numbers")
sum = 0