下のコードを打ったところ、エラーが発生しました。
fortran
1program tennsuu 2 implicit none 3 character(8) student !学生の名前 4 integer eng, math, phys 5 integer point300, point250 6 logical :: E0F=.false. 7 8 open( 2017, file='input.txt', action='read' ) 9 open( 2018, file='output.txt', status='replace' ) 10 11 do while ( E0F == .false. ) 12 13 read( 2017, *, end=999 ) student, eng, math, phys 14 write(*, *) student, eng, math, phys 15 16 point300 = eng + math + phys 17 point250 = eng + math * 0.75d0 + phys * 0.75d0 18 write( 2018, 22 ) student, point300, point250 19 22 format( a9, i4, i4) 20 21 enddo 22 23 999 E0f= .true. 24 25 close( 2017 ) 26 close( 2018 ) 27 end program tennsuu
エラーが以下の通りです
fortran
1 2 do while ( E0F == .false. ) 3 1 4Error: Logicals at (1) must be compared with .eqv. instead of == 5
input.txtには
naoto 70 0 80
satosi 5 8 10
einstein 99 94 93
tarou 9 100 98
とかいています。
エラー画面が何を言いたいのかわかりません。
回答お願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/21 05:45