Im writing a program to determine the horizontal distance of a ball but getting this error:(adsbygoogle = window.adsbygoogle || []).push({});

Y(t)=Y0+VY0*t+(1/2)*g*t^2

1

Error: Unclassifiable statement at (1)

Distance=(X(t))^2+(Y(t))^2

1

Error: Unclassifiable error at (1)

My code is as follows:

PROGRAM as_the_ball_is_thrown

IMPLICIT NONE

INTEGER::Y0, X0, V0, g, theta, t

CHARACTER::Distance, VY0, VX0, X(t), Y(t)

X0=0

Y0=0

V0=20

g=9.81

WRITE(*,*) "Please enter amount of time the ball traveled"

READ(*,*) t

WRITE(*,*) "Please enter the angle to which the ball was thrown"

READ(*,*) theta

DO

Y(t)=Y0+VY0*t+(1/2)*g*t^2

X(t)=X0+VX0*t

VX0=V0*COS(theta*3.14159/180)

VY0=V0*SIN(theta*3.14159/180)

Distance=(X(t))^2+(Y(t))^2

END DO

WRITE(*,*) "The horizontal distance the ball traveled is"

READ(*,*) Distance

WRITE(*,*) "meters"

END PROGRAM as_the_ball_is_thrown

Can anyone tell me why this is wrong?

Thanks!

**Physics Forums - The Fusion of Science and Community**

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

# Fortran: determine the horizontal distance of a ball

Loading...

Similar Threads - Fortran determine horizontal | Date |
---|---|

How to buy Fortran Programming Software Commersial License | Jan 30, 2018 |

Fortran for Computational Fluid Dynamics Problems | Jan 11, 2018 |

Porting Python Code to Fortran for Parallel Computing | Dec 15, 2017 |

[FORTRAN] Determining Apoapsis + Periapsis (Astrophysics) | Mar 29, 2013 |

**Physics Forums - The Fusion of Science and Community**