chap03/sample4.f90
1program sample
2 implicit none
3
4 real(8) :: x, y
5
6 write(*, *) 'Input two real numbers: '
7
8 ! 整数を読み込む
9 read(*, *) x, y
10
11 write(*, *) 'average = ',(x + y) / 2
12
13 stop
14endprogram sample
1program sample
2 implicit none
3
4 real(8) :: x, y
5
6 write(*, *) 'Input two real numbers: '
7
8 ! 整数を読み込む
9 read(*, *) x, y
10
11 write(*, *) 'average = ',(x + y) / 2
12
13 stop
14endprogram sample