This program approximates the roots of the polynomial using the false position method. The program prompts the user to input the coefficients of the polynomial, root approximations, and number of iterations. The code won't compile because of the error.
I don't understand why the line after Do while gives an Unclassifiable statement at (1) error.
integer aNew,bNew,cNew,dNew,eNew, n
real funcA, funcB, funcC, X0, X1, X2
Write(*,*) 'Please enter the coefficients for the polynomial'
Write(*,*) 'polynomial should be no more than order 4'
PRINT*, 'Enter values of A,B,C,D,E'
READ(*,*) aNew,bNew,cNew,dNew,eNew
Write(*,*) 'Enter initial approximation, '
Write(*,*) 'the values should be between -5 and 5 '
Read(*,*) X0,X1
Write(*,*) 'Enter number of tolerance (number of search iterations) '
Read(*,*) n
DO 10 I = 1,n
funcA = CALL F(aNew,bNew,cNew,dNew,eNew,X1)
funcB = CALL F(aNew,bNew,cNew,dNew,eNew,X0)
X2 = (X0*funcA - X1*funcB)/(funcA - funcB)
funcC = CALL F(aNew,bNew,cNew,dNew,eNew, X2)
IF(funcA*funcC .LT. 0.0)THEN
X0 = X2
ELSE
X1 = X2
END IF
10 Continue
Write(*,*) 'Value of the root',X2
CONTAINS
FUNCTION F(A,B,C,D,E,x)
integer A,B,C,D,E
real F
F = A*x**4 + B*x**3 + C*x**2 + D*x + E
END FUNCTION F
END Program