PROGRAM series * add the first 100 terms of a simple series IMPLICIT NONE REAL*8 sum INTEGER n * True BASIC automatically initializes variables to zero, * but other languages might not. sum = 0 DO n = 1, 100 sum = sum + 1.0D0/n/n WRITE(*,'(I6,F13.6)') n, sum END DO END