program cfit3 c c -- linear least-squares fit c -- figure 5.6 c integer length, out, max, lines real x(20), y(20), a, b, ycalc(20) character*1 ch common /inout/ out, max c out = 6 max = 20 10 call input(x, y, length) call linfit(x, y, ycalc, a, b, length) call output(x, y, ycalc, length) write(*,*) 'Press RETURN for plot' read(*,'(a1)') ch lines = 2*(length - 1) + 1 call plot(x, y, ycalc, length, out, lines) goto 10 end