calcute distance travelled by boby (s=ut+1/2AT^2)
DECLARE FUNCTION DIS(A,T,U)
CLS
INPUT"ENTER ACCELERATION";A
INPUT'ENTER TIME ";T
INPUT"ENTER INITIAL VELOCITY";U
PRINT"DISTANCE TRAVELLED BY BODY ';DIS(A,T,U)
END
FUNCTION DIS (A,T,U)
S=U*T+1/2*A*T^2
DIS = S
END FUNCTION
CLS
INPUT"ENTER ACCELERATION";A
INPUT'ENTER TIME ";T
INPUT"ENTER INITIAL VELOCITY";U
PRINT"DISTANCE TRAVELLED BY BODY ';DIS(A,T,U)
END
FUNCTION DIS (A,T,U)
S=U*T+1/2*A*T^2
DIS = S
END FUNCTION
Comments
Post a Comment