[Fortran] 纯文本查看 复制代码
Dimension a(100), a1(101), c(101), d(2), q(98)
Write (*, 3)
Read (*, *) n
np1 = n + 1
Write (*, 5)
Do i = 1, np1
Read (*, *) a1(i)
End Do
Do i = 1, n
a(i) = a1(i+1)/al(1)
End Do
。。。。。。。
3 Format (1X, 'Enter the order of the polynomial')
5 Format (1X, 'Enter the coefficients of the polynomial starting',&
' from the highest order'/5X, ' and press Enter key after ', &
'entering each number.')
10 Format (1X, 'Enter the initial guesses of d(l) and d(2)', &
'and Epsilon, e.g.,.005,.005,.00001:')
11 Format (1X, 'The Roots are :'//'REAL PART IMAGINARY', &
'PART ITERATIONS')
170 Format (F17.5, F18.5, 7X, I7)
298 Format (/5X, 'Denominator is zero.!')
352 Format (/5X, 'The process is not converging!')
368 Format (/5X, 'The process is slow in converging!')
382 Format (/5X, 'Iteration is terminated after 200 trials.')
390 End Program