25.
Using Function…… End
Function, write a program to calculate volume of hemisphere. [ volume = 2/3 πR3]
DECLARE FUNCTION VOLUME (R)
CLS
INPUT “ENTER RADIUS”; R
PRINT “VOLUME OF HEMISPHERE ”; VOLUME(R)
END
FUNCTION VOLUME (R)
VOLUME = (2 / 3) * 3.14 * R ^ 3
END FUNCTION
No comments:
Post a Comment