program main implicit none integer::b(3),next real*8::r,d read *,b ! b(3) = r*b(2)+d ! b(2) = r*b(1)+d ! b3-b2 = r(b2-b1) r = real(b(3)-b(2))/real(b(2)-b(1)) d = b(3)-r*b(2) next = NINT(r*b(3)+d) ! print *, b,r,d print'(i0)',next end program main