program diff integer(8) :: a integer(8) :: b do read (*,*,END=1) a, b print *, abs(a-b) end do 1 end program diff