|
Intermediate モジュール |
質問21/42
次のプログラムの正しい出力結果は以下のどれでしょうか?
次のプログラムの正しい出力結果は以下のどれでしょうか?
module common
implicit none
contains
subroutine swap(a, b)
integer, intent(inout) :: a, b
integer :: temp
temp = a
a = b
b = temp
end subroutine swap
end module common
program main
use common
implicit none
integer :: x = 5, y = 8, temp = 0
call swap(x, y)
print *, x, y, temp
end program main
選択肢1
8 5 5
選択肢2
5 8 0
選択肢3
8 5 0
選択肢4
5 8 5
選択肢5
8 5 *
Results matter. Trust nAG.
