くだすれFORTRAN(超初心者用)その3at TECH
くだすれFORTRAN(超初心者用)その3 - 暇つぶし2ch30:デフォルトの名無しさん
07/12/12 21:44:00
program test

implicit none

integer:: n
real(8):: x = 2.5d0, y = 3.3d0

n = intfunc(x, y)

print *, n

stop
end


integer function intfunc(x, y)

implicit none

real(8), intent(in):: x
real(8), intent(in):: y

intfunc = int(x) + int(y)

end function

サンプルなので、特に意味ある処理をしてあるわけじゃないですが、、。


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch