DECLARE FUNCTION DISTANCE ( U, A, T )
CLS
INPUT "Enter initial velocity"; U
INPUT "Enter acceleration"; A
INPUT "Enter time"; T
PRINT " Distance travelled="; DISTANCE ( U, A, T )
END
FUNCTION DISTANCE ( U, A, T )
DISTANCE = U 8 T + 1 / 2 * A * T ^ 2
END FUNCTION
CLS
INPUT "Enter initial velocity"; U
INPUT "Enter acceleration"; A
INPUT "Enter time"; T
PRINT " Distance travelled="; DISTANCE ( U, A, T )
END
FUNCTION DISTANCE ( U, A, T )
DISTANCE = U 8 T + 1 / 2 * A * T ^ 2
END FUNCTION
No comments:
Post a Comment