
Pi Single Thread Fortran
By: a guest on Apr 7th, 2010 | syntax:
Fortran | size: 0.25 KB | hits: 167 | expires: Never
program pi_singlethread
implicit none
integer limit
integer i
real :: pi=0
limit = 20000000
do i=0, limit
pi = pi + 4.0 / (4.0*i + 1.0);
pi = pi - 4.0 / (4.0*i + 3.0);
enddo
print*, pi
end