Jump to content

Sum and product of an array: Difference between revisions

m
→‎{{header|Fortran}}: Modified array constructor because it would cause an overflow error with example being demonstrated
m (→‎{{header|Fortran}}: Modified array constructor because it would cause an overflow error with example being demonstrated)
Line 258:
=={{header|Fortran}}==
In ISO Fortran 90 and later, use SUM and PRODUCT intrinsics:
integer, dimension(100010) :: a = (/ (i*i, i=1, 100010) /)
integer :: sresult, presult
179

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.