QBASIC program to fin average of three numbers using function.
DECLARE FUNCTION AVG(A,B,C)
CLS
INPUT"ENTER ANY THREE NUMBERS";A,B,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 ANY THREE NUMBERS";A,B,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