Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
A_04 TRAPEZOIDAL RULE (3(II))
PROGRAM TRAPIZOIDAL_DI_RULE IMPLICIT NONE REAL :: F,A,B,X,S,C,D,Y INTEGER :: I,N PRINT*,'INPUT THE VALUE OF FIRST LOWER AND UPPER LIMIT:' READ*,A,B PRINT*,'INPUT THE VALUE OF SECOND LOWER AND UPPER LIMIT:' READ*,C,D PRINT*,'ENTER THE VALUE OF N:' READ*,N S=((B-A)*(D-C)/16)*(F(A,C)+F(A,D)+F(B,C)+F(B,D)+2.0*(F((A+B)/2,C)+F((A+B)/2,D)+F(A,(C+D)/2)+F(B,(C+D)/2))+4.0*F((A+B)/2,(C+D)/2)) PRINT *, S END PROGRAM REAL FUNCTION F(X,Y) IMPLICIT NONE REAL :: X,Y F=LOG(X+2*Y) END FUNCTION
run
|
edit
|
history
|
help
0
Y
Random walk by using Monte Carlo method
Fortran!
underoverflow
Title
Sum of series
euler-cromer
Fhhjhh
Find HM
Vi ss. F