Monday, September 30, 2019

1) QBasic average of three numbers (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

No comments:

Post a Comment

My Journey with JM

MY JOURNEY WITH JAGAT MANDIR It has been almost 10 years since I have entered this school. It seems like just yesterday but now I...