program enshu12z                                                  
implicitnone
integer,parameter::kosuu=1024
real::x,y,sekibun
integer::i,isum
isum=0
doi=1,kosuu
callrandom_number(x)
callrandom_number(y)
if(x**2+y**2<=1.0)isum=isum+1
enddo
sekibun=real(isum)/real(kosuu)
write(*,*)kosuu,isum,sekibun,sekibun*4.0,abs(sekibun-atan(1.0))
endprogramenshu12z