chap04/kadai2.f90

サンプルコードのダウンロード

 1program answer
 2  implicit none
 3
 4  integer :: n, m
 5
 6  write(*, *) 'Input two integers: '
 7  read(*, *) n, m
 8
 9  if(n > m) then
10    write(*, *) n, ' is larger than ', m
11  else if(n < m) then
12    write(*, *) n, ' is smaller than ', m
13  else
14    write(*, *) n, ' is equal to ', m
15  endif
16
17  stop
18endprogram answer