Distance travelled by a body
DECLARE FUNCTION DIS(A,T,U)
CLS
INPUT"ENTER ACCELERATION";A
INPUT"ENTER TIME";T
INPUT"ENTER INITIAL VELOCITY";U
PRINT"DISTANCE TRAVELLED BY A BODY=";DIS(A,T,U)
END
FUNCTION DIS(A,T,U)
D= U*T+1/2*A*t^2
DIS=D
END FUNCTION
CLS
INPUT"ENTER ACCELERATION";A
INPUT"ENTER TIME";T
INPUT"ENTER INITIAL VELOCITY";U
PRINT"DISTANCE TRAVELLED BY A BODY=";DIS(A,T,U)
END
FUNCTION DIS(A,T,U)
D= U*T+1/2*A*t^2
DIS=D
END FUNCTION
Comments
Post a Comment