软件大小: | 1997 K | ||
上传用户: | richard_li_li | ||
关键词: | Source_Code rarFortran Fortran | ||
下载地址: | 免注册下载 普通下载 |
相关代码 |
|
program ex0833 implicit none interface ! 说明函数func的使用接口 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