くだすれFORTRAN(超初心者用)その5
■ このスレッドは過去ログ倉庫に格納されています
0367デフォルトの名無しさん
2010/11/19(金) 01:23:27implicit none
integer :: x, y, ios
character(len=100) :: str
open(unit=11, file="input.txt", status="OLD")
open(unit=12, file="output.txt", status="UNKNOWN")
do
read(11, "(A)", iostat=ios) str
if (ios /= 0) exit
read(str, *, iostat=ios) x, y
if ((ios /= 0) .or. ((x <= 123) .and. (y <= 32))) then
write(12, "(A)") trim(str)
end if
end do
close(11)
close(12)
end program hoge
■ このスレッドは過去ログ倉庫に格納されています