PROGRAM pi IMPLICIT NONE INTEGER, PARAMETER :: nb_iter=100000000 DOUBLE PRECISION :: pas, x, pi_approchee = 0.0D0, temps INTEGER :: i, t1, t2, ir pas = 1.0D0 / nb_iter CALL SYSTEM_CLOCK(count=t1) DO i=1, nb_iter x = pas * (i - 0.5D0) pi_approchee = pi_approchee + 4.0D0 * pas / (1.0D0 + x * x) END DO CALL SYSTEM_CLOCK(count=t2, count_rate=ir) temps = REAL(t2 - t1) / ir PRINT '(" Valeur approchee de PI = ", F16.14)', pi_approchee PRINT '(" Temps d''execution : ", F7.3, " sec.")', temps END PROGRAM pi