



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This code is to explain concept behind programming. It was provided by Prof. Ahalya Waman at Birla Institute of Technology and Science for Computer Programming Fundamentals course. It includes: Output, Computer, Program, RK, Methid, Matrix, Algorithm, Programming
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




REAL ALPHA, Ti, K1, K2, K3, K4, W, H, N, A, B WRITE(,)'INPUT INTEGRAION LIMITS' READ(,) A, B WRITE(,)'INPUT NUMBER OF ITERATIONS N' READ(,) N WRITE(,)'ENTER INITIAL CONDITION Y(0)' READ(,) ALPHA H = (B - A) / N W = ALPHA
DO I=0, NWRITE(,)' FOR I =',I
Ti = A + H * I K1 = H * (-1 * W + Ti + 1) K2 = H * (-1 * (W + (K1/2)) + (Ti + H/2) + 1) K3 = H * (-1 * (W + (K2/2)) + (Ti + H/2) + 1) K4 = H * (-1 * (W + K3) + (Ti + H) + 1) W = W + (K1 + 2 * K2 + 2 * K3 + K4) / 6 WRITE(,)' K1 =',K WRITE(,)' K2 =',K WRITE(,)' K3 =',K WRITE(,)' K4 =',K WRITE(,)' W =',W ENDDO END