QBASIC PROGRAM TO FIND AVERAGE OF THREE NUMBERS(FUNCTION)


DECLARE FUNCTION AVERAGE (A, B, C)
CLS
INPUT “ENTER ANY THREE NUMBERS”; A, B, C
PRINT “AVERAGE OF 3 NUMBERS =”; AVERAGE (A, B, C)
END

FUNCTION AVERAGE (A, B, C)
AV = (A + B + C) / 3
AVERAGE = AV
END FUNCTION

Comments

Popular Posts