I have recently started FORTRAN to learn Can any body explain, what these lines of code written in FORTRAN are doing...
!USE MSFLIB
use IFPORT
implicit none
integer nmax,i,m,v,c,j,d
parameter(nmax=50)
real*8 h,x(2),y(2),f(2),r1(2),r2(2),t
real*8 r3(2),r4(2),pi,tmax,ti,lam,k
character*20 data1
real*4 r,rr,z(nmax),p(nmax)
c Initial Values
!k=20
pi=4d0*atan(1d0)
do 200 j=1,nmax
z(j)=28*RAND()
!write(*,*) z(j) !50
p(j)=10*RAND() !10
200 continue
do 100 m=1,nmax
c=0
d=0
x(1)=z(m)
x(2)=p(m)
write(*,*) m, x(1),x(2)
tmax=1000*pi
h=pi/10000
k=0.5d0 !1.00026
v=4.0d0 !15.03
lam=0.90d0
c Oppening the Data File and Writting the Data in:
write(data1, '("a16.dat",i2.2)' )
open(11,file=data1,status='unknown')
close(11)
c**********************************************************************
do 10 ti=0,tmax,h
do 20 i=1,2
y(i)=x(i)
20 continue
t=ti
f(1)=x(2)
f(2)=-1d0+k*v*exp(-k*(x(1)-lam*sin(t)))
do 30 i=1,2
r1(i)=f(i)*h
x(i)=y(i)+r1(i)/2
30 continue
t=ti+h/2