- #1
jhosamelly
- 128
- 0
I have the code.
Code:
program star
implicit none
real (kind=8) :: x
integer :: i
dt=0.001
pi=4*(atan1.0)
do i=1, Nsteps
t = n*dt
!calculate acceleration
ax=
ay=...
!calculate values at next step
vy=vy+ay*dt
vx=vx+ax*dt
x=x+vx*dt
y=y+vy*dt
end do
print *, "vx= ", vx
end program star
Last edited: