x1= 60.0
x2= 45.0
y1a= sin(dtor(x1))
y1b= sqrt(3.0)/2.0
y2a= sin(dtor(x2))
y2b= 1.0/sqrt(2.0)
write(*, '(1x, 2f10.6)')y1a, y1b
write(*, '(1x, 2f10.6)')y2a, y2b
pause
! -----------------------------------------------
! swap the contents of y1a, y2a
call swap_real(y1a, y2a)
write(*, '(1x, 2f10.6)')y1a, y1b
write(*, '(1x, 2f10.6)')y2a, y2b
end
! -----------------------------------------------
subroutine swap_real(x, y)
implicit none
real x,y,z
z= x
x= y
y= z
end
! -----------------------------------------------
function dtor(d1)
implicit none
real dtor, d1
dtor= d1/180.0*(4.0*atan(1.0))
end
! -----------------------------------------------