Sum of a series: Difference between revisions

Content deleted Content added
Rahul (talk | contribs)
Line 88: Line 88:
=={{header|Fortran}}==
=={{header|Fortran}}==
In ISO Fortran 90 and later, use SUM intrinsic:
In ISO Fortran 90 and later, use SUM intrinsic:
REAL, DIMENSION(1000) :: A = (/ (1.0/(i*i), i=1, 1000) /)
real, dimension(1000) :: a = (/ (1.0/(i*i), i=1, 1000) /)
REAL :: RESULT
real :: result
RESULT = SUM(A);
result = sum(a);


=={{header|Haskell}}==
=={{header|Haskell}}==