program ex01
implicit none
interface
elemental real function func(num)
implicit none
real,intent(in) ::num
end function
end interface
integer i
real::a(10)=(/(i,i=1,10)/)
real::b(10)
write(*,"(10f6.2)")a
a=func(a)
write(*,"(10f6.2)")a
end program

elemental real function func(num)
implicit none
real,intent(in)::num
func=sin(num)+cos(num)
return
end function