- #1

CCguru

- 2

- 0

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!