Search This Blog

Tuesday, October 22, 2019

Program to calculate distance using FUNCTION

DECLARE FUNCTION DISTANCE(A,U,T)
CLS
INPUT"ENTER ACCELERATION",A
INPUT"ENTER INITIAL VELOCITY";U
INPUT"ENTER TIME";T
PRINT"DISTANCE TRAVELLED=";DISTANCE(A,U,T)
END

FUNCTION DISTANCE(A,U,T)
S=U*T+1/2*A*T^2
DISTANCE=S
END FUNCTION

No comments:

Post a Comment

My journy with Jagat Mandir

10 years of journy with JM it was the most important day of my life i spend my 10 years with this school . I am so happy that i could spend...