Hey so I'm getting the error message:(adsbygoogle = window.adsbygoogle || []).push({});

And here is my code:Code (Text):

Euler_Method.f90:43.1:

fun=(c)(1-c)/(d+2)

1

Error: Unclassifiable statement at (1)

Code (Fortran):

PROGRAM Euler_Method

!-------------------------------------------------------------------

! The purpose of this program is to read in endpoints, initial

!conditions, and a stepsize from the user, and then use Euler's

!method to approximate the value of the function f(x,y)=y(1-y)/x+2

!over that interval.

!-------------------------------------------------------------------

IMPLICIT NONE

REAL:: alpha, h, inr, x, y

INTEGER:: i, b

WRITE(*,*) "Please enter the rightmost endpoint"

WRITE(*,*) "of the interval over which you wish to find an"

WRITE(*,*) "approximation of f(x,y). (Must be integer value)"

READ(*,*) b

WRITE(*,*) "Please enter x of y(x)."

READ(*,*) inr

WRITE(*,*) "Please enter y of y(x)."

READ(*,*) alpha

WRITE(*,*) "Please enter the stepsize."

READ(*,*) h

DO i=0, b

y=2

x=0

x=x+h*fun(x,y)

y=y+h

!Output at each step

WRITE(*,*) x

END DO

WRITE(*,*)"The final approximation is:",x,"."

CONTAINS

REAL FUNCTION fun(c,d)

IMPLICIT NONE

REAL, INTENT(in):: c,d

fun=(c)(1-c)/(d+2)

RETURN

END FUNCTION fun

END PROGRAM Euler_Method

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Fortran compile error I can't figure out

Tags:

Loading...

Similar Threads for Fortran compile error |
---|

Fortran Successive Over Relaxation Method in FORTRAN |

If statement for Monte Carlo integration |

C/++/# How to use C++ in studying calculus |

Fortran How to buy Fortran Programming Software Commersial License |

Fortran Fortran for Computational Fluid Dynamics Problems |

**Physics Forums | Science Articles, Homework Help, Discussion**