26. Using Sub…… End Sub,
write a program to calculate area of sphere. [ area = 4πr2]
DECLARE SUB TSAREA (R)
CLS
INPUT “ENTER RADIUS”; R
CALL TSAREA(R)
END
SUB TSAREA (R)
A= 4 * 3.14 * R ^ 2
PRINT “TOTAL SURFACE AREA OF SPHERE “; A
END SUB
Please give me an example
ReplyDelete