Calculates the sum of
a vector of size n. The vector has the given size n, and
contains the first consecutive integers (from 1). The computation
is done by calling Fortran and C, through Python.
The result will be, of course, S =
n (1 + n) ⁄ 2 (or 55 for the given
n = 10).
Files involved (download):
vec_sum.f90,
vec_sum.c,
Vecsum.py
Advantage is taken from: PHP,
for the web page; Python, as "glue"; Fortran
and C for the numerical computing. |