Wednesday, October 16, 2019

QBASIC to find Volume of Cylinder usinf FUNCTION

 DECLARE FUNCTION VOL ( R, H )
CLS
INPUT "Enter radius"; R
INPUT "Enter height"; H
PRINT "Volume of cylinder"; VOL ( R, H )
END

FUNCTION VOL ( R, H )
VOL = 22 / 7 * r ^ 2 * H
END FUNCTION

No comments:

Post a Comment