1) Avg of three numbers
DECLARE FUNCTION AVG(A,B,C)
CLS
INPUT"Enter first number";A
INPUT"Enter second number";B
INPUT"Enter third number";C
PRINT"Average of three numbers=";AVG (A,B,C)
END
FUNCTION AVG (A,B,C)
AV=(A+B+C)/3
AVG=AV
END FUNCTION
DECLARE FUNCTION AVG(A,B,C)
CLS
INPUT"Enter first number";A
INPUT"Enter second number";B
INPUT"Enter third number";C
PRINT"Average of three numbers=";AVG (A,B,C)
END
FUNCTION AVG (A,B,C)
AV=(A+B+C)/3
AVG=AV
END FUNCTION
Comments
Post a Comment