Elementary Principles 485 - 11.17(cont'd d REAL F(51 SUM1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
11- 14 d. REAL F(51), SUM1, SUM2, SIMP INTEGER I, J, NPD(3), N, NM1, NM2 DATA NPD/5, 21, 51/ FN(C) = (1.441 – 24.3 * C) ** 2/(0.02407 – C)/(0.01605 – C) DO 10 I = 1, 3 N = NPD(I) NM1 = N – 1 NM2 = N – 2 DO 20 J = 1, N C = 0.01204 * FLOAT(J – 1)/FLOAT(NM1) F(J) = FN(C) 20 CONTINUE SUM1 = 0. DO 30 J = 2, NM1, 2 SUM = SUM1 + F(S) 30 CONTINUE SUM2 = 0. DO 40 J = 3, NM2, 2 SUM2 = SUM2 + F(J) 40 CONTINUE SIMP = 0.01204/FLOAT(NM1)/3.0 * (F(1) + F(N) + 4.0 * SUM1 + 2.0 * SUM2) T = SIMP/2.92 WRITE (6, 1) N, T 10 CONTINUE 1 FORMAT (I4, 'POINTS —', 2X, F7.1, 'MINUTES') END RESULTS 5 POINTS — 91.0 MINUTES 21 POINTS — 90.4 MINUTES
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online